code: def _indirectly_writes(function):
      """Set of variables written by the given function including callees."""
      queue = [function]
      visited = set()
      answer = set()
      while queue:
          func = queue.pop()
          if func in visited:
              continue
          visited.add(func)
          answer = answer.union(_directly_writes(func.graph))
          queue += list(_directly_calls(func.graph))
      return answer
  
file_path: probability/tensorflow_probability/python/experimental/auto_batching/allocation_strategy.py
imports: from absl import logging
  import six
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import liveness
label_desc: Use image node_id 9 for calling a global function with example usage: _indirectly_writes(function) and returns: answer