code: def _prefer_static_where(condition, x, y):
      args = [condition, x, y]
      constant_args = [ops.get_static_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: probability/tensorflow_probability/python/internal/backend/numpy/gen/slicing.py
imports: import collections
  import functools
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import dtype
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import numpy_array
  from tensorflow_probability.python.internal.backend.numpy import nest
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import linalg_impl
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy.gen import tensor_shape
  from tensorflow_probability.python.internal.backend.numpy import private
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