code: def _get_sample_dict_from_datatype(datatype: Any) -> dict:
      if hasattr(datatype, "get_sample_data"):
          return datatype.get_sample_data()
  
      datatype_props = datatype.schema()["properties"]
      out: Dict[str, Any] = {}
      for k, v in datatype_props.items():
          if v["type"] == "string":
              out[k] = "data string"
          elif v["type"] == "number":
              out[k] = 0.0
          elif v["type"] == "integer":
              out[k] = 0
          elif v["type"] == "boolean":
              out[k] = False
          else:
              raise TypeError("Unsupported type")
      return out
  
imports: import abc
  import asyncio
  import base64
  import os
  import platform
  from typing import TYPE_CHECKING, Any, Dict, Optional
  import requests
  import uvicorn
  from fastapi import FastAPI
  from lightning_utilities.core.imports import compare_version, module_available
  from pydantic import BaseModel
  from lightning.app.core.work import LightningWork
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.imports import _is_torch_available, requires
label_desc: Use image node_id 6 for calling the PythonServer obj's underlying member method code with example usage: obj._get_sample_dict_from_datatype(datatype) and returns: out, datatype