code: def _validate_args(**kwargs):
      not_in_remote = kwargs.pop("not_in_remote", None)
      cloud = kwargs.pop("cloud", None)
      remote = kwargs.pop("remote", None)
      if remote and not (cloud or not_in_remote):
          raise InvalidArgumentError(
              "`--remote` requires `--cloud` or `--not-in-remote`"
          )
      if not_in_remote and cloud:
          raise InvalidArgumentError(
              "`--not-in-remote` and `--cloud` are mutually exclusive"
          )
      if not any(kwargs.values()):
          raise InvalidArgumentError(
              "Either of `-w|--workspace`, `-a|--all-branches`, `-T|--all-tags` "
              "`--all-experiments`, `--all-commits`, `--date` or `--rev` "
              "needs to be set."
          )
      if kwargs.get("num") and not kwargs.get("rev"):
          raise InvalidArgumentError(
              "`--num` can only be used alongside `--rev`"
          )
  
file_path: dvc/dvc/repo/gc.py
imports: from typing import TYPE_CHECKING, List, Optional
  from dvc.exceptions import InvalidArgumentError
  from dvc.log import logger
  from .None import locked
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_args() without return types