code: def _schema_to_tf_dtypes_ngram(schema, ngram):
      """Returns schema as a list of tensorflow dtypes for a ngram.
      :param schema: The schema.
      :param ngram: The ngram.
      :return: tensorflow dtypes for a ngram.
      """
      result = []
      # Iterate over each timestep
      for key in sorted(ngram.fields.keys()):
          # Get schema at that timestep
          new_schema = ngram.get_schema_at_timestep(
              schema=schema, timestep=key
          )
          for field in new_schema.fields.values():
              result.append(_numpy_to_tf_dtypes(field.numpy_dtype))
      return result
  
imports: import datetime
  import sys
  import warnings
  from calendar import timegm
  from collections import OrderedDict, namedtuple
  from decimal import Decimal
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: _schema_to_tf_dtypes_ngram(schema, ngram) and returns: result