def on_term(term_node)
      # Return original term node unless the function is kin/kinaseActivity.
      function = term_node.function
      return term_node unless
        %w(kin kinaseActivity).include?(function.identifier.string_literal)

      # If kinaseActivity update the children of the term (produces new AST).
      term_node.updated([
        # activity function
        process(term_node.function),
        # original arguments
        term_node.arguments,
        # additional molecularActivity argument
        add_molecular_activity('kin')
      ].flatten)
    end
def on_term(term_node)
      # Return original term node unless the function is kin/kinaseActivity.
      function = term_node.function
      return term_node unless
        %w(kin kinaseActivity).include?(function.identifier.string_literal)

      # If kinaseActivity update the children of the term (produces new AST).
      term_node.updated([
        # activity function
        process(term_node.function),
        # original arguments
        term_node.arguments,
        # additional molecularActivity argument
        add_molecular_activity('kin')
      ].flatten)
    end
Called when visiting nodes of type +term+.