class_docstr: Database for `PreprocessingCache` class.
  Includes low-level idea of caching pipeline preprocessor items using relational database.
  
  :param cache_dir: path to the place where cache files should be stored.
class_docstr_tok: ["Database","for","`","PreprocessingCache","`","class",".","Includes","low-level","idea","of","caching","pipeline","preprocessor","items","using","relational","database",".",":","param","cache_dir",":","path","to","the","place","where","cache","files","should","be","stored","."]
docstr: Tries to return both data processors, None if is not found
  
  :param uid: uid of preproccesor to be loaded
  
  :return matched: pair of data processors (encoder, imputer) or None
docstr_tok: ["Tries","to","return","both","data","processors",",","None","if","is","not","found",":","param","uid",":","uid","of","preproccesor","to","be","loaded",":","return","matched",":","pair","of","data","processors","(","encoder",",","imputer",")","or","None"]
code: def get_preprocessor(
      self, uid: str
  ) -> Optional[
      Tuple[
          Dict[str, OneHotEncodingImplementation],
          Dict[str, ImputationImplementation],
      ]
  ]:
      """
      Tries to return both data processors, None if is not found
  
      :param uid: uid of preproccesor to be loaded
  
      :return matched: pair of data processors (encoder, imputer) or None
      """
      with closing(sqlite3.connect(self.db_path)) as conn:
          with conn:
              cur = conn.cursor()
              cur.execute(
                  f"SELECT encoder, imputer FROM {self._main_table} WHERE id = ?;",
                  [uid],
              )
              matched = cur.fetchone()
              is_loaded = False
              if matched is not None:
                  matched = tuple(
                      [pickle.loads(matched[i]) for i in range(2)]
                  )
                  is_loaded = True
              if self.use_stats:
                  if is_loaded:
                      self._inc_eff(cur, "preprocessors_hit")
                  self._inc_eff(cur, "preprocessors_total")
              return matched
  
file_path: FEDOT/fedot/core/caching/preprocessing_cache_db.py
imports: import pickle
  import sqlite3
  from contextlib import closing
  from typing import Dict, Optional, Tuple
  from fedot.core.caching.base_cache_db import BaseCacheDB
  from fedot.core.operations.evaluation.operation_implementations.data_operations.categorical_encoders import OneHotEncodingImplementation
  from fedot.core.operations.evaluation.operation_implementations.data_operations.sklearn_transformations import ImputationImplementation
  from fedot.preprocessing.preprocessing import DataPreprocessor
label_desc: Use image node_id 2 for calling the PreprocessingCacheDB obj's underlying member method code with example usage: obj.get_preprocessor(uid) and returns: matched