code: def from_bin(class_, blob):
          
          f = io.BytesIO(blob)
          tx = class_.parse(f)
          try:
              tx.parse_unspents(f)
          except Exception:
              # parsing unspents failed
              tx.unspents = []
          return tx
docs: Return the Tx for the given binary blob.
  
          :param blob: a binary blob containing a transaction streamed in standard
              form. The blob may also include the unspents (a nonstandard extension,
              optionally written by :func:`Tx.stream <stream>`), and they will also be parsed.
          :return: :class:`Tx`
  
          If parsing fails, an exception is raised.