How to import a function?

I want to import a function I created in another Jupyter notebook. I tried a lot of ways given on the internet but couldn’t do it successfully. Help?

Install ipynb from your command prompt
pip install import-ipynb

Import in your notebook file
import import_ipynb

Now use regular import command to import your file
import Jupyter_Notebook_name