class_docstr: Instantiates a Python object and runs its run() method (if provided).
  
  If disable_run() is called before launch, instance.run() method won't be
  called. This is useful in TAP-based integration tests, where users might need
  to step each worker synchronously.
class_docstr_tok: ["Instantiates","a","Python","object","and","runs","its","run","(",")","method","(","if","provided",")",".","If","disable_run","(",")","is","called","before","launch",",","instance.run","(",")","method","wo","n't","be","called",".","This","is","useful","in","TAP-based","integration","tests",",","where","users","might","need","to","step","each","worker","synchronously","."]
code: def _collect_input_handles(self):
      self._input_handles.clear()
      try:
          # Find input handles and put them in self._input_handles.
          fn = functools.partial(
              base.extract_handles, handles=self._input_handles
          )
          _ = [fn(x) for x in tree.flatten((self._args, self._kwargs))]
      except TypeError as e:
          raise ValueError(
              f"Failed to construct the {self.__class__.__name__} with\n"
              f"- constructor: {self._constructor}\n"
              f"- args: {self._args}\n- kwargs: {self._kwargs}"
          ) from e
  
imports: import functools
  import itertools
  from typing import Any, Callable, Generic, TypeVar
  from absl import flags
  from absl import logging
  from launchpad import context
  from launchpad import lazy_loader
  from launchpad.nodes import base
  from launchpad.nodes import dereference
  from launchpad.nodes.python import addressing
  from launchpad.nodes.python import local_multi_processing
  import tree
label_desc: Use image node_id 2 for calling the PyClassNode obj's underlying member method code with example usage: obj._collect_input_handles() without return types