class_docstr: A CachedDirectedFunction that updates attributes when called.
  
  Expects the wrapped function to return an `(out, attributes)` tuple.
  Updates the cached attributes based on the second element of the response.
class_docstr_tok: ["A","CachedDirectedFunction","that","updates","attributes","when","called",".","Expects","the","wrapped","function","to","return","an","`","(","out",",","attributes",")","`","tuple",".","Updates","the","cached","attributes","based","on","the","second","element","of","the","response","."]
code: def _invoke(
      self, input, fn_name, kwargs, attributes
  ):  # pylint: disable=redefined-builtin
      # Update `attributes` with the attrs returned by `_func`.
      output, greedy_attrs = getattr(self.bijector, fn_name)(
          input, **kwargs
      )
      if greedy_attrs is not None:
          attributes.update(greedy_attrs)
      return output
  
imports: import collections
  import weakref
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling the BijectorCacheWithGreedyAttrs obj's underlying member method code with example usage: obj._invoke(input, fn_name, kwargs, attributes) and returns: output