code: def __init__(self, *args, **kwargs):
      sagemaker.ServeEnv.__init__(self, *args, **kwargs)
  
      if self.sagemaker_batch:
          from .serve.app import ForecastConfig
  
          self.batch_config = ForecastConfig.parse_raw(
              os.environ["INFERENCE_CONFIG"]
          )
      else:
          self.batch_config = None
  
file_path: gluonts/src/gluonts/shell/env.py
imports: import os
  import tarfile
  from distutils.util import strtobool
  from functools import partial
  from typing import Dict, Optional, Union
  from toolz import valmap
  from gluonts.dataset.common import Dataset, FileDataset, MetaData
  from gluonts.model import Predictor
  from gluonts.util import safe_extractall
  from .None import sagemaker
label_desc: Use image node_id 1 to create a new ServeEnv object from inherited base classes: sagemaker with example: obj = ServeEnv()