class_docstr: Transformer base class.
class_docstr_tok: ["Transformer","base","class","."]
docstr: Magic [...] method, return column subsetted transformer.
  
  First index does input subsetting, second index does output subsetting.
  
  Keys must be valid inputs for `columns` in `ColumnSelect`.
  
  Parameters
  ----------
  key: valid input for `columns` in `ColumnSelect`, or pair thereof
      keys can also be a :-slice, in which case it is considered as not passed
  
  Returns
  -------
  the following TransformerPipeline object:
      ColumnSelect(columns1) * self * ColumnSelect(columns2)
      where `columns1` is first or only item in `key`, and `columns2` is the last
      if only one item is passed in `key`, only `columns1` is applied to input
code: def __getitem__(self, key):
      """Magic [...] method, return column subsetted transformer.
  
      First index does input subsetting, second index does output subsetting.
  
      Keys must be valid inputs for `columns` in `ColumnSelect`.
  
      Parameters
      ----------
      key: valid input for `columns` in `ColumnSelect`, or pair thereof
          keys can also be a :-slice, in which case it is considered as not passed
  
      Returns
      -------
      the following TransformerPipeline object:
          ColumnSelect(columns1) * self * ColumnSelect(columns2)
          where `columns1` is first or only item in `key`, and `columns2` is the last
          if only one item is passed in `key`, only `columns1` is applied to input
      """
      from sktime.transformations.series.subset import ColumnSelect
  
      def is_noneslice(obj):
          res = isinstance(obj, slice)
          res = (
              res
              and obj.start is None
              and obj.stop is None
              and obj.step is None
          )
          return res
  
      if isinstance(key, tuple):
          if not len(key) == 2:
              raise ValueError(
                  "there should be one or two keys when calling [] or getitem, "
                  "e.g., mytrafo[key], or mytrafo[key1, key2]"
              )
          columns1 = key[0]
          columns2 = key[1]
          if is_noneslice(columns1) and is_noneslice(columns2):
              return self
          elif is_noneslice(columns2):
              return ColumnSelect(columns1) * self
          elif is_noneslice(columns1):
              return self * ColumnSelect(columns2)
          else:
              return (
                  ColumnSelect(columns1) * self * ColumnSelect(columns2)
              )
      else:
          return ColumnSelect(key) * self
  
imports: from itertools import product
  from typing import Union
  import numpy
  import pandas
  from sktime.base import BaseEstimator
  from sktime.datatypes import VectorizedDF, check_is_error_msg, check_is_mtype, check_is_scitype, convert, convert_to, mtype_to_scitype, update_data
  from sktime.datatypes._series_as_panel import convert_to_scitype
  from sktime.utils.sklearn import is_sklearn_classifier, is_sklearn_clusterer, is_sklearn_regressor, is_sklearn_transformer
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 9 for calling the BaseTransformer obj's underlying member method code with example usage: obj.__getitem__(key) and returns: res, unknown, self, unknown, unknown, unknown