code: def parse_script(output_script):
          
          script_iterator = output_script.raw_iter()
  
          try:
              first_opcode, _, _ = next(script_iterator, (None, None, None))
              _, data, _ = next(script_iterator, (None, None, None))
              remainder = next(script_iterator, None)
          except bitcoin.core.script.CScriptTruncatedPushDataError:
              return None
          except bitcoin.core.script.CScriptInvalidError:
              return None
  
          if first_opcode == bitcoin.core.script.OP_RETURN and data is not None and remainder is None:
              return data
          else:
              return None
docs: Parses an output and returns the payload if the output matches the right pattern for a marker output,
          or None otherwise.
  
          :param CScript output_script: The output script to be parsed.
          :return: The marker output payload if the output fits the pattern, None otherwise.
          :rtype: bytes