code: def _get_args(op, name):
      
      # Could use multipledispatch here to avoid the pasta
      if isinstance(op, ops.Selection):
          assert name is not None, 'name is None'
          result = op.selections
  
          # if Selection.selections is always columnar, could use an
          # OrderedDict to prevent scanning the whole thing
          return [col for col in result if col._name == name]
      elif isinstance(op, ops.Aggregation):
          assert name is not None, 'name is None'
          return [
              col
              for col in itertools.chain(op.by, op.metrics)
              if col._name == name
          ]
      else:
          return op.args
docs: Hack to get relevant arguments for lineage computation.
  
      We need a better way to determine the relevant arguments of an expression.