old_contents: 
  import hashlib
  
  class User(object):
      """ Bank user. Can log in and do stuff or just act as a passive object.
      Another class must be used to persist these instances in local storage. """
  
      agency = ''
      account = ''
      password = '' # md5
      balance = 0
      history = []
  
      is_logged_in = False
  
      def __init__(self, agency, account, password, balance=None, history=None):
          """ Constructor. Highly limited actions while it's not logged in.
  
          Args:
              agency   (str): Agency identification code.
              account  (str): Account identification code.
              password (str): Password MD5 hash, put None if it's unknown.
              balance  (num): Balance in R$, put None if it's unknown.
              history (list): A list of balance transaction records, put None if it's unknown.
          """
          self.agency = agency
          self.account = account
          self.password = password
  
          if balance is not None:
              self.balance = balance
  
          if history is not None:
              self.history = history
  
  
  
      def log_in(self, password_str):
          """ TODO
          Access this existent bank account, authenticating by this password string.
  
          Args:
              password_str (str): A password in natural language.
  
          Returns:
              bool: True if it was successfully authenticated, False otherwise.
  
          """
          self.is_logged_in = self.password == self.str_to_hash(password_str)
          return self.is_logged_in
  
  
  
      def str_to_hash(self, param):
          """ Generate a hash of a string param using md5 algorithm
  
          Args:
              param (str): The content string for hashing.
  
          Returns:
              str: A hash, generated by a md5 algorithm, using the parameter.
  
          """
          param = param.encode('utf-8')
          my_hash = hashlib.md5(param)
          return my_hash.hexdigest()
  
  
  
      def hash_password(self):
          """ Hashes the password of this instance
          (it's supposed to be already hashed, but this function is nice in test environment). """
          self.password = self.str_to_hash(self.password)
  
  
new_contents: 
  import hashlib
  
  class User(object):
      """ Bank user. Can log in and do stuff or just act as a passive object.
      Another class must be used to persist these instances in local storage. """
  
      agency = ''
      account = ''
      password = '' # md5
      balance = 0
      history = []
  
      is_logged_in = False
  
      def __init__(self, agency, account, password, balance=None, history=None):
          """ Constructor. Highly limited actions while it's not logged in.
  
          Args:
              agency   (str): Agency identification code.
              account  (str): Account identification code.
              password (str): Password MD5 hash, put None if it's unknown.
              balance  (num): Balance in R$, put None if it's unknown.
              history (list): A list of balance transaction records, put None if it's unknown.
          """
          self.agency = agency
          self.account = account
          self.password = password
  
          if balance is not None:
              self.balance = balance
  
          if history is not None:
              self.history = history
  
  
  
      def log_in(self, password_str):
          """ TODO
          Access this existent bank account, authenticating by this password string.
  
          Args:
              password_str (str): A password in natural language.
  
          Returns:
              bool: True if it was successfully authenticated, False otherwise.
  
          """
          self.is_logged_in = self.password == self.str_to_hash(password_str)
          return self.is_logged_in
  
  
  
      def transfer_to(self, amount, another_user):
          """ Transfer an amount of cash from this user to another one.
          This instance must have enough balance to do so.
  
          Args:
              amount       (num): Cash in R$ to discount from this instance user
                                  and to increase in another user account.
              another_use (User): Another use to receive this transfering amount of cash.
  
          Returns:
              bool: True if cash has been transfered from this instance to another, False otherwise.
  
          """
          if self.balance >= amount:
              self.balance -= amount
              another_user.balance += amount
              return True
  
          return False
  
  
  
      def str_to_hash(self, param):
          """ Generate a hash of a string param using md5 algorithm
  
          Args:
              param (str): The content string for hashing.
  
          Returns:
              str: A hash, generated by a md5 algorithm, using the parameter.
  
          """
          param = param.encode('utf-8')
          my_hash = hashlib.md5(param)
          return my_hash.hexdigest()
  
  
  
      def hash_password(self):
          """ Hashes the password of this instance
          (it's supposed to be already hashed, but this function is nice in test environment). """
          self.password = self.str_to_hash(self.password)
  
  
subject: Add transfering function