code: def __encode_password(self, password):
      logging.debug("encoding password")
      hasher = hashlib.sha1()
      hasher.update(password.encode("utf-8"))
      digest_bytes = hasher.digest()
      byte_string = binascii.hexlify(digest_bytes)
      output = byte_string.decode("utf-8")
      logging.debug("encoded password hash: %s", output)
      return output
  
file_path: datalad/datalad/support/third/nda_aws_token_generator.py
imports: import binascii
  import hashlib
  import logging
  import xml.etree.ElementTree
  import sys
label_desc: Use image node_id 3 for calling the NDATokenGenerator obj's underlying member method code with example usage: obj.__encode_password(password) and returns: output