code: def _maybe_validate_matrix(a, validate_args):
      """Checks that input is a `float` matrix."""
      assertions = []
      if not dtype_util.is_floating(a.dtype):
          raise TypeError(
              "Input `a` must have `float`-like `dtype` "
              "(saw {}).".format(dtype_util.name(a.dtype))
          )
      if tensorshape_util.rank(a.shape) is not None:
          if tensorshape_util.rank(a.shape) < 2:
              raise ValueError(
                  "Input `a` must have at least 2 dimensions "
                  "(saw: {}).".format(tensorshape_util.rank(a.shape))
              )
      elif validate_args:
          assertions.append(
              assert_util.assert_rank_at_least(
                  a,
                  rank=2,
                  message="Input `a` must have at least 2 dimensions.",
              )
          )
      return assertions
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 19 for calling a global function with example usage: _maybe_validate_matrix(a, validate_args) and returns: assertions