code: def __init__(
      self,
      api_type: str,
      model: Callable,
      preprocess_fn=None,
      postprocess_fn=None,
      preprocess_conf: Optional[dict] = None,
      postprocess_conf: Optional[dict] = None,
      **kwargs,
  ):
      if not preprocess_conf:
          preprocess_conf = {}
      if not postprocess_conf:
          postprocess_conf = {}
  
      self.api_type = api_type.upper()
      self.model = model
      self.preprocess_conf = preprocess_conf
      self.postprocess_conf = postprocess_conf
      self.data_processor: Optional[
          DataProcessor
      ] = self.set_data_processor(preprocess_fn, postprocess_fn)
  
file_path: chitra/chitra/serve/base.py
imports: import itertools
  from typing import Callable, List, Optional
  from chitra.data_processing import DataProcessor
  from chitra.serve import constants
label_desc: Use image node_id 1 to create a new ModelServer object  with example: obj = ModelServer(api_type, model, preprocess_fn, postprocess_fn, preprocess_conf, postprocess_conf)