code: def GetLoopConstantEnter(value):
      """Return the enter op if we can infer `value` to be a loop invariant."""
      id_ops = {"Switch", "RefSwitch", "Identity", "RefIdentity"}
      op = value.op
      while op.type in id_ops:
          op = op.inputs[0].op
      return op if IsLoopConstantEnter(op) else None
  
imports: import os
  import traceback
  from tensorflow.python import tf2
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 17 for calling a global function with example usage: GetLoopConstantEnter(value) and returns: unknown