docstr: Sample a single pixel-iteration and apply channel conditioning.
  
  Parameters
  ----------
  component_logits
      4D `Tensor` of logits for the Categorical distribution
      over Quantized Logistic mixture components. Dimensions are `[batch_size,
      height, width, num_logistic_mix]`.
  locs
      4D `Tensor` of location parameters for the Quantized Logistic
      mixture components. Dimensions are `[batch_size, height, width,
      num_logistic_mix, num_channels]`.
  scales
      4D `Tensor` of location parameters for the Quantized Logistic
      mixture components. Dimensions are `[batch_size, height, width,
      num_logistic_mix, num_channels]`.
  coeffs
      4D `Tensor` of coefficients for the linear dependence among color
      channels, or `None` if there is only one channel. Dimensions are
      `[batch_size, height, width, num_logistic_mix, num_coeffs]`, where
      `num_coeffs = num_channels * (num_channels - 1) // 2`.
  seed
      `int`, random seed.
  
  Returns
  -------
  samples
      4D `Tensor` of sampled image data with autoregression among             channels. Dimensions are `[batch_size, height, width, num_channels]`.
code: def _sample_channels(
      self, component_logits, locs, scales, coeffs=None, seed=None
  ):
      """Sample a single pixel-iteration and apply channel conditioning.
  
          Parameters
          ----------
          component_logits
              4D `Tensor` of logits for the Categorical distribution
              over Quantized Logistic mixture components. Dimensions are `[batch_size,
              height, width, num_logistic_mix]`.
          locs
              4D `Tensor` of location parameters for the Quantized Logistic
              mixture components. Dimensions are `[batch_size, height, width,
              num_logistic_mix, num_channels]`.
          scales
              4D `Tensor` of location parameters for the Quantized Logistic
              mixture components. Dimensions are `[batch_size, height, width,
              num_logistic_mix, num_channels]`.
          coeffs
              4D `Tensor` of coefficients for the linear dependence among color
              channels, or `None` if there is only one channel. Dimensions are
              `[batch_size, height, width, num_logistic_mix, num_coeffs]`, where
              `num_coeffs = num_channels * (num_channels - 1) // 2`.
          seed
              `int`, random seed.
  
          Returns
          -------
          samples
              4D `Tensor` of sampled image data with autoregression among \
              channels. Dimensions are `[batch_size, height, width, num_channels]`.
          """
      num_channels = self.event_shape[-1]
  
      # sample mixture components once for the entire pixel
      component_dist = categorical.Categorical(logits=component_logits)
      mask = tf.one_hot(
          indices=component_dist.sample(seed=seed),
          depth=self._num_logistic_mix,
      )
      mask = tf.cast(mask[..., tf.newaxis], self.dtype)
  
      # apply mixture component mask and separate out RGB parameters
      masked_locs = tf.reduce_sum(locs * mask, axis=-2)
      loc_tensors = tf.split(masked_locs, num_channels, axis=-1)
      masked_scales = tf.reduce_sum(scales * mask, axis=-2)
      scale_tensors = tf.split(masked_scales, num_channels, axis=-1)
  
      if coeffs is not None:
          num_coeffs = num_channels * (num_channels - 1) // 2
          masked_coeffs = tf.reduce_sum(coeffs * mask, axis=-2)
          coef_tensors = tf.split(masked_coeffs, num_coeffs, axis=-1)
  
      channel_samples = []
      coef_count = 0
      for i in range(num_channels):
          loc = loc_tensors[i]
          for c in channel_samples:
              loc += c * coef_tensors[coef_count]
              coef_count += 1
  
          logistic_samp = logistic.Logistic(
              loc=loc, scale=scale_tensors[i]
          ).sample(seed=seed)
          logistic_samp = tf.clip_by_value(logistic_samp, -1.0, 1.0)
          channel_samples.append(logistic_samp)
  
      return tf.concat(channel_samples, axis=-1)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import numpy
  import warnings
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import distribution
  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 quantized_distribution
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 5 for calling the PixelCNN obj's underlying member method code with example usage: obj._sample_channels(component_logits, locs, scales, coeffs, seed) and returns: tf