parameters: (package, message=None)
docstring: Try import specified package, with custom message support.
      Parameters
      ----------
      package : str
          The name of the targeting package.
      message : str, default is None
          If not None, this function will raise customized error message when import error is found.
      Returns
      -------
      module if found, raise ImportError otherwise
docstring_summary: Try import specified package, with custom message support.
      Parameters
      ----------
      package : str
          The name of the targeting package.
      message : str, default is None
          If not None, this function will raise customized error message when import error is found.
      Returns
      -------
      module if found, raise ImportError otherwise
docstring_tokens: Try import specified package with custom message support . Parameters ---------- package : str The name of the targeting package . message : str default is None If not None this function will raise customized error message when import error is found . Returns ------- module if found raise ImportError otherwise
function: def try_import(package, message=None):
      """Try import specified package, with custom message support.
      Parameters
      ----------
      package : str
          The name of the targeting package.
      message : str, default is None
          If not None, this function will raise customized error message when import error is found.
      Returns
      -------
      module if found, raise ImportError otherwise
      """
      try:
          return __import__(package)
      except ImportError as e:
          if not message:
              raise e
          raise ImportError(message)
function_tokens: def try_import ( package , message = None ) : try : return __import__ ( package ) except ImportError as e : if not message : raise e raise ImportError ( message )