code: def concat(cls, iterables):
      
  
      def generator():
        for it in iterables:
          for element in it:
            yield element
      return cls(generator())
docs: Similar to #itertools.chain.from_iterable().