Hi Shyamal,
You seem to have copied the function call without the function definition. Every function you'll see in python code isn't a package / library of its own. In fact, most times the package name will be something else and then under it there will be multiple functions. Many times a custom function is written within the program itself to take care of some task. You should also just search the name with "python" before it on the web - if it doesn't throw up some proper results, then it's likely not in some package that you have to import.
When troubleshooting, it's always helpful to go back to the source where you copied from and search for earlier places in the code where the same name repeats.
OR when you're asking others for help, you need to provide full context, including a link to the place you copied the code from, boil the code down to absolute example values ( like: how is one supposed to know what is edge_mrt[edge] here - a string, a datetime object, a number ?)
I'll also encourage you to sign up for a free account on
ChatGPT (openai.com) and first ask questions there - now several of these questions get answered there itself with nice explanation instead of having to post to large human groups and waiting for days for reply. I've used it to learn a lot of things at basic level. For deeper details, in few cases it's still prone to silly errors and we have to cross-reference the original documentation. But it helps us get there.
And then for bare-technical stuff there is stackoverflow, definitely be logged in there as well when you want to troubleshoot, and it's a better resource for technical coding help than this group. We first get a cold shower treatment for our incomplete questions due to the reasons above, and after that we improve to become good at explaining the questions - so much that in certain cases we end up solving the problem ourselves while we're typing out the details around the question, because we now notice some details we had missed earlier.