is there any way to get derivative path from public key and xpub? I have an xpub derived from m/44'/0'/1' can I get that path again from generated xpub or pubkey?  something like
def get_path(xpub):

   return derivative_path
No, you can't, apart from trying various paths and re-deriving it.