class_docstr: Since tfd.Sample uses transposes, it requires a custom event bijector.
class_docstr_tok: ["Since","tfd.Sample","uses","transposes",",","it","requires","a","custom","event","bijector","."]
docstr: Maybe return a `_NonCompositeTensorDefaultSampleBijector`.
docstr_tok: ["Maybe","return","a","`","_NonCompositeTensorDefaultSampleBijector","`","."]
code: def __new__(cls, *args, **kwargs):
      """Maybe return a `_NonCompositeTensorDefaultSampleBijector`."""
  
      if cls is _DefaultSampleBijector:
          if args:
              distribution = args[0]
          else:
              distribution = kwargs.get("distribution")
          if len(args) > 3:
              bijector = args[3]
          else:
              bijector = kwargs.get("bijector")
  
          if not (
              auto_composite_tensor.is_composite_tensor(distribution)
              and auto_composite_tensor.is_composite_tensor(bijector)
          ):
              return _NonCompositeTensorDefaultSampleBijector(
                  *args, **kwargs
              )
      return super(_DefaultSampleBijector, cls).__new__(cls)
  
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 1 for calling the _DefaultSampleBijector obj's underlying member method code with example usage: obj.__new__(cls) and returns: super, _NonCompositeTensorDefaultSampleBijector