code: def get_password_hash(username):
      
      try:
          h = spwd.getspnam(username)
      except KeyError:
          return None
  
      # mitogen.core.Secret() is a Unicode subclass with a repr() that hides the
      # secret data. This keeps secret stuff out of logs. Like blobs, secrets can
      # also be serialized.
      return mitogen.core.Secret(h)
docs: Fetch a user's password hash.