class_docstr: :class:`BasePreprocessor` to input handle data.
  
  A preprocessor should be used in two steps. First, `fit`, then,
  `transform`. `fit` collects information into `context`, which includes
  everything the preprocessor needs to `transform` together with other
  useful information for later use. `fit` will only change the
  preprocessor's inner state but not the input data. In contrast,
  `transform` returns a modified copy of the input data without changing
  the preprocessor's inner state.
docstr: Save the :class:`DSSMPreprocessor` object.
  
  A saved :class:`DSSMPreprocessor` is represented as a directory with
  the `context` object (fitted parameters on training data), it will
  be saved by `pickle`.
  
  :param dirpath: directory path of the saved :class:`DSSMPreprocessor`.
docstr_tok: ["Save","the",":","class",":","`","DSSMPreprocessor","`","object",".","A","saved",":","class",":","`","DSSMPreprocessor","`","is","represented","as","a","directory","with","the","`","context","`","object","(","fitted","parameters","on","training","data",")",",","it","will","be","saved","by","`","pickle","`",".",":","param","dirpath",":","directory","path","of","the","saved",":","class",":","`","DSSMPreprocessor","`","."]
code: def save(self, dirpath: typing.Union[str, Path]):
      """
      Save the :class:`DSSMPreprocessor` object.
  
      A saved :class:`DSSMPreprocessor` is represented as a directory with
      the `context` object (fitted parameters on training data), it will
      be saved by `pickle`.
  
      :param dirpath: directory path of the saved :class:`DSSMPreprocessor`.
      """
      dirpath = Path(dirpath)
      data_file_path = dirpath.joinpath(self.DATA_FILENAME)
  
      if data_file_path.exists():
          raise FileExistsError(
              f"{data_file_path} instance exist, fail to save."
          )
      elif not dirpath.exists():
          dirpath.mkdir()
  
      dill.dump(self, open(data_file_path, mode="wb"))
  
file_path: MatchZoo/matchzoo/engine/base_preprocessor.py
imports: import abc
  import functools
  import typing
  from pathlib import Path
  import dill
  import matchzoo
label_desc: Use image node_id 6 for calling the BasePreprocessor obj's underlying member method code with example usage: obj.save(dirpath) without return types