code: def _prefer_static_where(condition, x, y):
      args = [condition, x, y]
      constant_args = [tensor_util.constant_value(a) for a in args]
      # Do this statically.
      if all(arg is not None for arg in constant_args):
          condition_, x_, y_ = constant_args
          return np.where(condition_, x_, y_)
      return array_ops.where(condition, x, y)
  
file_path: tensorflow/tensorflow/python/ops/linalg/slicing.py
imports: import collections
  import functools
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling a global function with example usage: _prefer_static_where(condition, x, y) and returns: array_ops, np