class_docstr: Sequentially apply a list of transforms.
  
  Each of the individual steps in the chain must be transformers (i.e a child
  class of `TransformerBase`) which can be one of the following:
  
  - Native transformer modules in Turi Create (e.g.
    :py:class:`~turicreate.toolkits.feature_engineering._feature_hasher.FeatureHasher`).
  - User-created modules (defined by inheriting
    :py:class:`~turicreate.toolkits.feature_engineering._feature_engineering.TransformerBase`).
  
  Parameters
  ----------
  steps: list[Transformer]
      The list of transformers to be chained. A step in the chain can be
      another chain.
  
  See Also
  --------
  turicreate.toolkits.feature_engineering.create
  
  Examples
  --------
  
  .. sourcecode:: python
  
      # Create data.
      >>> sf = turicreate.SFrame({'a': [1,2,3], 'b' : [2,3,4]})
  
      # Create a chain a transformers.
      >>> from turicreate.feature_engineering import *
  
      # Create a chain of transformers.
      >>> chain = turicreate.feature_engineering.create(sf,[
                                  QuadraticFeatures(),
                                  FeatureHasher()
                                ])
  
      # Create a chain of transformers with names for each of the steps.
      >>> chain = turicreate.feature_engineering.create(sf, [
                                  ('quadratic', QuadraticFeatures()),
                                  ('hasher', FeatureHasher())
                                ])
  
      # Transform the data.
      >>> transformed_sf = chain.transform(sf)
  
      # Save the transformer.
      >>> chain.save('save-path')
  
      # Access each of the steps in the transformer by name or index
      >>> steps = chain['steps']
      >>> steps = chain['steps_by_name']
class_docstr_tok: ["Sequentially","apply","a","list","of","transforms",".","Each","of","the","individual","steps","in","the","chain","must","be","transformers","(","i.e","a","child","class","of","`","TransformerBase","`",")","which","can","be","one","of","the","following",":","-","Native","transformer","modules","in","Turi","Create","(","e.g",".",":","py",":","class",":","`","~turicreate.toolkits.feature_engineering._feature_hasher.FeatureHasher","`",")",".","-","User-created","modules","(","defined","by","inheriting",":","py",":","class",":","`","~turicreate.toolkits.feature_engineering._feature_engineering.TransformerBase","`",")",".","Parameters","--","--","--","--","--","steps",":","list","[","Transformer","]","The","list","of","transformers","to","be","chained",".","A","step","in","the","chain","can","be","another","chain",".","See","Also","--","--","--","--","turicreate.toolkits.feature_engineering.create","Examples","--","--","--","--","..","sourcecode",":",":","python","#","Create","data",".",">",">",">","sf","=","turicreate.SFrame","(","{","'","a","'",":","[","1,2,3","]",",","'","b","'",":","[","2,3,4","]","}",")","#","Create","a","chain","a","transformers",".",">",">",">","from","turicreate.feature_engineering","import","*","#","Create","a","chain","of","transformers",".",">",">",">","chain","=","turicreate.feature_engineering.create","(","sf",",","[","QuadraticFeatures","(",")",",","FeatureHasher","(",")","]",")","#","Create","a","chain","of","transformers","with","names","for","each","of","the","steps",".",">",">",">","chain","=","turicreate.feature_engineering.create","(","sf",",","[","(","'quadratic","'",",","QuadraticFeatures","(",")",")",",","(","'hasher","'",",","FeatureHasher","(",")",")","]",")","#","Transform","the","data",".",">",">",">","transformed_sf","=","chain.transform","(","sf",")","#","Save","the","transformer",".",">",">",">","chain.save","(","'save-path","'",")","#","Access","each","of","the","steps","in","the","transformer","by","name","or","index",">",">",">","steps","=","chain","[","'steps","'","]",">",">",">","steps","=","chain","[","'steps_by_name","'","]"]
docstr: Parameters
  ----------
  steps: list[Transformer] | list[tuple(name, Transformer)]
  
      List of Transformers or (name, Transformer) tuples. These are
      chained in the order in which they are provided in the list.
docstr_tok: ["Parameters","--","--","--","--","--","steps",":","list","[","Transformer","]","|","list","[","tuple","(","name",",","Transformer",")","]","List","of","Transformers","or","(","name",",","Transformer",")","tuples",".","These","are","chained","in","the","order","in","which","they","are","provided","in","the","list","."]
code: def __init__(self, steps):
      """
      Parameters
      ----------
      steps: list[Transformer] | list[tuple(name, Transformer)]
  
          List of Transformers or (name, Transformer) tuples. These are
          chained in the order in which they are provided in the list.
  
      """
      # Basic type checking.
      _raise_error_if_not_of_type(steps, [list])
  
      # Split into (name, transformer) pairs. If the name is not present
      # then use the index as name.
      transformers = []
      index = 0
      for step in steps:
          if isinstance(step, tuple):
              name, tr = step
          else:
              tr = step
              name = index
  
          if isinstance(tr, list):
              tr = TransformerChain(tr)
          if not issubclass(tr.__class__, _TransformerBase):
              raise TypeError(
                  "Each step in the chain must be a Transformer."
              )
          transformers.append((name, tr))
          index = index + 1
  
      # Save into a dictionary for lookups by name and index.
      self._state = {}
      self._state["steps"] = steps
      self._state["steps_by_name"] = {}
      index = 0
      for name, tr in transformers:
          self._state["steps_by_name"][name] = tr
          index = index + 1
  
      # The transformers as (name, obj) tuple (used here for fitting
      # and transforming).
      self._transformers = transformers
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.toolkits._internal_utils import _toolkit_repr_print
  from turicreate.toolkits._internal_utils import _precomputed_field
  from turicreate.util import _raise_error_if_not_of_type
  from .None import _internal_utils
  from ._feature_engineering import TransformerBase
  from ._feature_engineering import Transformer
  from copy import copy
  import inspect
  import sys
label_desc: Use image node_id 1 to create a new TransformerChain object from inherited base classes: _TransformerBase with example: obj = TransformerChain(steps)