code: def getAccountFromPublicKey(self, pub):
          
          # FIXME, this only returns the first associated key.
          # If the key is used by multiple accounts, this
          # will surely lead to undesired behavior
          names = list(self.getAccountsFromPublicKey(str(pub)))
          if names:
              return names[0]
docs: Obtain the first account name from public key