code: def use_tf_compat_v1(force_tf_compat_v1: bool) -> bool:
      """Evaluate from environment variables if TF should be used in compat.v1 mode."""
      # If tf.enable_v2_behavior has been called, but eager execution has been
      # disabled, force compat v1 behavior. Hence, check
      # `executing_eagerly_outside_functions` as well.
      return (
          force_tf_compat_v1
          or not tf2.enabled()
          or not tf.compat.v1.executing_eagerly_outside_functions()
      )
  
file_path: transform/tensorflow_transform/tf2_utils.py
imports: import copy
  import itertools
  from typing import Collection, Iterable, Mapping, Optional, Tuple
  import tensorflow
  from tensorflow_transform import common_types
  from tensorflow.python import tf2
  from tensorflow.python.framework.func_graph import FuncGraph
label_desc: Use image node_id 1 for calling a global function with example usage: use_tf_compat_v1(force_tf_compat_v1) and returns: unknown