code: def loads(cls, s: str) -> 'Money':
          
          try:
              currency, amount = s.strip().split()
              return cls(amount, currency)
          except ValueError as err:
              raise ValueError("failed to parse string "
                               " '{}': {}".format(s, err))
docs: Parse from a string representation (repr)