code: def import_message(
      submodule: str,
      package: str,
      conda_channel: str = None,
      pip_install: bool = False,
  ):
      """Return warning if package is not found.
  
      Generic message for indicating to the user when a function relies on an
      optional module / package that is not currently installed. Includes
      installation instructions. Used in `chemistry.py` and `biology.py`.
  
      Args:
          submodule: `pyjanitor` submodule that needs an external dependency.
          package: External package this submodule relies on.
          conda_channel: `conda` channel package can be installed from,
              if at all.
          pip_install: Whether package can be installed via `pip`.
      """
      is_conda = os.path.exists(os.path.join(sys.prefix, "conda-meta"))
      installable = True
      if is_conda:
          if conda_channel is None:
              installable = False
              installation = f"{package} cannot be installed via conda"
          else:
              installation = (
                  f"conda install -c {conda_channel} {package}"
              )
      else:
          if pip_install:
              installation = f"pip install {package}"
          else:
              installable = False
              installation = f"{package} cannot be installed via pip"
  
      print(
          f"To use the janitor submodule {submodule}, you need to install "
          f"{package}."
      )
      print()
      if installable:
          print("To do so, use the following command:")
          print()
          print(f"    {installation}")
      else:
          print(f"{installation}")
  
imports: from __future__ import annotations
  import importlib
  import os
  import socket
  import sys
  from functools import singledispatch, wraps
  from pathlib import Path
  from typing import Any, Callable, Dict, Iterable, List, Union
  from warnings import warn
  import numpy
  import pandas
label_desc: Use image node_id 8 for calling a global function with example usage: import_message(submodule, package, conda_channel, pip_install) without return types