code: def attach(item, action, greedy=False, ignore_no_tokens=None, ignore_one_token=None):
      
      if use_computation_graph:
          # use the action's annotations to generate the defaults
          if ignore_no_tokens is None:
              ignore_no_tokens = getattr(action, "ignore_no_tokens", False)
          if ignore_one_token is None:
              ignore_one_token = getattr(action, "ignore_one_token", False)
          # only include True keyword arguments in the partial, since False is the default
          kwargs = {}
          if greedy:
              kwargs["greedy"] = greedy
          if ignore_no_tokens:
              kwargs["ignore_no_tokens"] = ignore_no_tokens
          if ignore_one_token:
              kwargs["ignore_one_token"] = ignore_one_token
          action = partial(ComputationNode, action, **kwargs)
      return add_action(item, action)
docs: Set the parse action for the given item to create a node in the computation graph.