import re


def is_pip_install_command(cmd, *args, **kwargs):  # pylint: disable=unused-argument
  """Check if cmd represents a pip command."""
  # Check if the command starts with pip/pip2/pip3 and a space.
  # This won't trigger on every pip invocation, but will catch the most common.
  return re.match(r"^pip[23]?\s+install", cmd.strip())