code: def get_types(
      cls: Type, keys: Optional[List[str]] = None
  ) -> Optional[List[Type]]:
      if keys is None:
          return None
      types = []
      for key in keys:
          _type = None
          annotations = getattr(cls, "__annotations__", None)
          if annotations and key in annotations:
              _type = annotations[key]
          else:
              for parent_cls in cls.mro():
                  sub_annotations = getattr(
                      parent_cls, "__annotations__", None
                  )
                  if sub_annotations and key in sub_annotations:
                      _type = sub_annotations[key]
          if _type is None:
              return None
          types.append(_type)
      return types
  
imports: from enum import Enum
  from enum import EnumMeta
  import sys
  import types
  from typing import Any
  from typing import Callable
  from typing import List
  from typing import Optional
  from typing import Set
  from typing import Type
  from typing import Union
  from capnp.lib.capnp import _DynamicStructBuilder
  from pydantic import BaseModel
  import syft
  from ..util.util import get_fully_qualified_name
  from ..util.util import index_syft_by_module_name
  from .capnp import get_capnp_schema
label_desc: Use image node_id 1 for calling a global function with example usage: get_types(cls, keys) and returns: types, None, None