code: def _build_tensor(self, ndarray, dtype=None):
      # Enforce parameterized dtype and static/dynamic testing.
      if dtype is None:
          dtype = self.dtype
      ndarray = np.array(ndarray, dtype=dtype)
      if self.use_static_shape:
          return tf.convert_to_tensor(ndarray)
      else:
          return tf1.placeholder_with_default(ndarray, shape=None)
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 29 for calling the _MixtureSameFamilyTest obj's underlying member method code with example usage: obj._build_tensor(ndarray, dtype) and returns: tf, tf1