class_docstr: A step in the pipeline.
  
  Parameters
  ----------
  skobject : BaseObject
      The sktime object that is used in the step.
  name : str
      The name of the step.
  input_edges : dict
      A dict with string keys to string values. Identifying the
      predcessors.  The keys of the edges dict specify to which argument
      of fit/predict/.. the output of the predecessors (the value of the
      dict specifies the predecessors name) should be passed.
  method : str
      The method that should be called on the skobject. If None, the pipeline
       selects the method based on the method
       that is called on the pipeline (e.g., predict, transform, ..)
  params : dict
      The parameters that should be passed to the skobject when calling
      method
class_docstr_tok: ["A","step","in","the","pipeline",".","Parameters","--","--","--","--","--","skobject",":","BaseObject","The","sktime","object","that","is","used","in","the","step",".","name",":","str","The","name","of","the","step",".","input_edges",":","dict","A","dict","with","string","keys","to","string","values",".","Identifying","the","predcessors",".","The","keys","of","the","edges","dict","specify","to","which","argument","of","fit\/predict\/","..","the","output","of","the","predecessors","(","the","value","of","the","dict","specifies","the","predecessors","name",")","should","be","passed",".","method",":","str","The","method","that","should","be","called","on","the","skobject",".","If","None",",","the","pipeline","selects","the","method","based","on","the","method","that","is","called","on","the","pipeline","(","e.g.",",","predict",",","transform",",","..",")","params",":","dict","The","parameters","that","should","be","passed","to","the","skobject","when","calling","method"]
docstr: Get the results of the pipeline step.
  
  Parameters
  ----------
  fit : bool
      Whether the pipeline is in fit mode.
  required_method : str
      The method that should be called on the step.
  mro : list
      The method resolution order of the step. I.e., first try to call
      the first method, if not possible second method, etc.
  kwargs : dict
      The kwargs that should be passed to the method.
docstr_tok: ["Get","the","results","of","the","pipeline","step",".","Parameters","--","--","--","--","--","fit",":","bool","Whether","the","pipeline","is","in","fit","mode",".","required_method",":","str","The","method","that","should","be","called","on","the","step",".","mro",":","list","The","method","resolution","order","of","the","step",".","I.e.",",","first","try","to","call","the","first","method",",","if","not","possible","second","method",",","etc",".","kwargs",":","dict","The","kwargs","that","should","be","passed","to","the","method","."]
code: def get_result(self, fit, required_method, mro, kwargs):
      """
      Get the results of the pipeline step.
  
      Parameters
      ----------
      fit : bool
          Whether the pipeline is in fit mode.
      required_method : str
          The method that should be called on the step.
      mro : list
          The method resolution order of the step. I.e., first try to call
          the first method, if not possible second method, etc.
      kwargs : dict
          The kwargs that should be passed to the method.
      """
      if self.buffer is not None or self.input_edges is None:
          return StepResult(self.buffer, mode=self.mode)
  
      # 1. Get results from all previous steps!
      input_data, self.mode, all_none = self._fetch_input_data(
          fit, required_method, mro, kwargs
      )
  
      # 2. Get the method that should be called on skobject
      if self.method is not None:
          mro = [self.method]
      if (
          hasattr(self.skobject, "fit")
          and fit
          and not self.skobject.is_fitted
      ):
          kwargs_ = self._extract_kwargs("fit", kwargs)
          self.skobject.fit(**input_data, **kwargs_)
  
          # if the skobject is a forecaster, passby the input
          # data if is fitted in the same call
          if isinstance(self.skobject, BaseForecaster):
              self._store_to_buffer(input_data["y"])
              return StepResult(input_data["y"], mode=self.mode)
  
      for method in mro:
          if hasattr(self.skobject, method):
              non_default_parameter = any(
                  map(
                      lambda x: x.default == inspect.Parameter.empty,
                      inspect.signature(
                          getattr(self.skobject, method)
                      ).parameters.values(),
                  )
              )
              if all_none and non_default_parameter:
                  # Skip method if all input data is None and the method
                  # requires parameters.
                  continue
              kwargs_ = self._extract_kwargs(method, kwargs)
              if "fh" in kwargs_ and fit:
                  # Perform in sample prediction if the get_result is called
                  # during fitting the pipeline. In the case a provided,
                  # fh should be replaced with the length of the time series.
                  kwargs_["fh"] = (
                      input_data["y"].index
                      if hasattr(input_data["y"], "index")
                      else range(len(input_data["y"]))
                  )
              # 3. Call method on skobject and return result
              if self.mode == "proba":
                  idx = input_data["X"].columns
                  n = idx.nlevels
                  yt = dict()
                  for ix in idx:
                      levels = list(range(1, n))
                      if len(levels) == 1:
                          levels = levels[0]
                      yt[ix] = input_data["X"][ix]
                      yt[ix] = getattr(self.skobject, method)(
                          X=yt[ix], **kwargs_
                      ).to_frame()
                  result = pd.concat(yt.values(), axis=1)
              else:
                  result = getattr(self.skobject, method)(
                      **dict(
                          filter(
                              lambda k: k[0]
                              in inspect.getfullargspec(
                                  getattr(self.skobject, method)
                              ).args,
                              input_data.items(),
                          )
                      ),
                      **kwargs_,
                  )
  
              self.mode = (
                  "proba"
                  if (
                      method
                      in [
                          "predict_interval",
                          "predict_quantiles",
                          "predict_proba",
                      ]
                  )
                  or (self.mode == "proba")
                  else ""
              )
              self._store_to_buffer(result)
              return StepResult(result, self.mode)
  
      return StepResult(None, "")
  
file_path: sktime/sktime/pipeline/step.py
imports: import inspect
  from copy import deepcopy
  import pandas
  from sktime.forecasting.base import BaseForecaster
label_desc: Use image node_id 4 for calling the Step obj's underlying member method code with example usage: obj.get_result(fit, required_method, mro, kwargs) and returns: StepResult, StepResult, StepResult, StepResult