def _prune_arg(l, key, extra=0):
  """Removes list entry "key" and "extra" additional entries, if present.

  Args:
    l (list): The list to prune.
    key (object): The list entry to identify and remove.
    extra (int): Additional entries after key to prune, if found.
  """
  try:
    idx = l.index(key)
    args = l[idx:idx+extra+1]
    del(l[idx:idx+extra+1])
    return args
  except ValueError:
    return None