code: def _force_leaf(struct):
      # Returns `True` if `struct` should be treated as a leaf, rather than
      # expanded/recursed into.
      return hasattr(struct, "_tfp_nest_expansion_force_leaf")
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 5 for calling a global function with example usage: _force_leaf(struct) and returns: hasattr