code: def create(
      self,
      target: str,
      df: Optional[pd.DataFrame] = None,
      args: Optional[Dict] = None,
  ) -> None:
      if args is None:
          args = {}
      type_of_cols = infer_types(df, 0).dtypes
      target_dtype = type_of_cols[target]
  
      if target_dtype in ["binary", "categorical", "tags"]:
          model = TPOTClassifier(
              generations=args.get("generations", 10),
              population_size=args.get("population_size", 100),
              verbosity=0,
              max_time_mins=args.get("max_time_mins", None),
              n_jobs=args.get("n_jobs", -1),
          )
  
      elif target_dtype in ["integer", "float", "quantity"]:
          model = TPOTRegressor(
              generations=args.get("generations", 10),
              population_size=args.get("population_size", 100),
              verbosity=0,
              max_time_mins=args.get("max_time_mins", None),
              n_jobs=args.get("n_jobs", -1),
          )
  
      if df is not None:
          # Separate out the categorical and non-categorical columns
          categorical_cols = [
              col
              for col, type_col in type_of_cols.items()
              if type_col in ("categorical", "binary")
          ]
  
          # Fit a LabelEncoder for each categorical column and store it in a dictionary
          le_dict = {}
          for col in categorical_cols:
              le = LabelEncoder()
              le.fit(df[col])
              le_dict[col] = le
  
              # Encode the categorical column using the fitted LabelEncoder
              df[col] = le.transform(df[col])
  
          model.fit(df.drop(columns=[target]), df[target])
          self.model_storage.json_set("args", args)
          self.model_storage.file_set("le_dict", dill.dumps(le_dict))
          self.model_storage.file_set(
              "model", dill.dumps(model.fitted_pipeline_)
          )
      else:
          raise Exception("Data is empty!!")
  
file_path: mindsdb/mindsdb/integrations/handlers/tpot_handler/tpot_handler.py
imports: from typing import Optional
  import dill
  import pandas
  from mindsdb.integrations.libs.base import BaseMLEngine
  from typing import Dict, Optional
  from type_infer.api import infer_types
  from tpot import TPOTClassifier, TPOTRegressor
  from sklearn.preprocessing import LabelEncoder
label_desc: Use image node_id 1 for calling the TPOTHandler obj's underlying member method code with example usage: obj.create(target, df, args) without return types