code: def _constant(position: tf.Tensor) -> tf.Tensor:
      """B-Spline basis function of degree 0 for positions in the range [0, 1]."""
      # A piecewise constant spline is discontinuous at the knots.
      return tf.expand_dims(
          tf.clip_by_value(1.0 + position, 1.0, 1.0), axis=-1
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import enum
  from typing import Tuple, Union
  import tensorflow
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 1 for calling a global function with example usage: _constant(position) and returns: tf