code: def allowed_to_types(is_integer=True):
      if is_integer:
          return {dtypes.int32, dtypes.int16, dtypes.int8}
      else:
          return {
              dtypes.float16,
              dtypes.bfloat16,
              dtypes.float8_e5m2,
              dtypes.float8_e4m3fn,
          }
  
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import gen_stochastic_cast_op
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: allowed_to_types(is_integer) and returns: unknown, unknown