code: def _intake_fill_value_for_nd_interp(fill_value, dtype):
      """Check `fill_value` and return after converting numeric to tensor."""
      if isinstance(fill_value, str):
          if fill_value != "constant_extension":
              raise ValueError(
                  "A fill value ({}) was not an allowed string ({})".format(
                      fill_value, "constant_extension"
                  )
              )
      else:
          fill_value = tf.convert_to_tensor(
              fill_value, name="fill_value", dtype=dtype
          )
          _assert_ndims_statically(fill_value, expect_ndims=0)
      return fill_value
  
imports: import itertools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 8 for calling a global function with example usage: _intake_fill_value_for_nd_interp(fill_value, dtype) and returns: fill_value