code: def lint_plugin(session: Session, plugin: Plugin) -> None:
      install_cmd = ["pip", "install"]
      install_hydra(session, install_cmd)
  
      # plugin linting requires the plugin and its dependencies to be installed
      install_plugin(
          session=session, install_cmd=install_cmd, plugin=plugin
      )
  
      install_dev_deps(session)
  
      session.run("flake8", "--config", ".flake8", plugin.abspath)
      path = plugin.abspath
      source_dir = plugin.source_dir
      session.chdir(path)
      session.run(*_black_cmd(), silent=SILENT)
      session.run(*_isort_cmd(), silent=SILENT)
      session.chdir(BASE)
  
      files = []
      for file in ["tests", "example"]:
          abs = os.path.join(path, file)
          if os.path.exists(abs):
              files.append(abs)
  
      # Mypy for plugin
      session.run(
          *_mypy_cmd(
              strict=True,
              # Don't pass --python-version flag when linting plugins, as mypy may
              # report syntax errors if the passed --python-version is different
              # from the python version that was used to install the plugin's
              # dependencies.
              python_version=None,
          ),
          "--follow-imports=silent",
          f"{path}/{source_dir}",
          *files,
          silent=SILENT,
      )
  
imports: import copy
  import functools
  import os
  import platform
  import subprocess
  import sys
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Iterator, List, Optional, Tuple, Union
  import nox
  from nox import Session
  from nox.logger import logger
label_desc: Use image node_id 26 for calling a global function with example usage: lint_plugin(session, plugin) without return types