code: def _strfactory(cls, line):
          
  
          assert type(line) == str, "this is a factory from string"
  
          line = line.rstrip().split()[1:] # the first component is the keyword "chain"
          tup = [t[0](t[1]) for t in zip([int, str, int, str, int, int, str, int, str, int, int, str], line)]
          return tuple.__new__(cls, tup)
docs: factory class method for Chain
  
          :param line: header of a chain (in .chain format)