class_docstr: Data Model
class_docstr_tok: ["Data","Model"]
code: def _to_base_type(cls, value):
      if isinstance(value, dict):
          # Note: this should come before DataModel to handle data models that are simply a dict
          # (and thus are not expected to have additional named properties)
          return {k: cls._to_base_type(v) for k, v in value.items()}
      elif isinstance(value, DataModel):
          return value.to_dict()
      elif isinstance(value, enum.Enum):
          return value.value
      elif isinstance(value, list):
          return [cls._to_base_type(model) for model in value]
      return value
  
imports: import keyword
  import enum
  import json
  from datetime import datetime
  import jsonschema
  from enum import Enum
  import six
label_desc: Use image node_id 2 for calling the DataModel obj's underlying member method code with example usage: obj._to_base_type(cls, value) and returns: value, unknown, value, value, unknown