original_docstring: Imports a python package into the current namespace.
  
      Parameters
      --------
  
      rel_path_to_package : str
          Path to the package containing director relative from this script's
          directory.
      package_name : str
          The name of the package to be imported.
  
      Returns
      ---------
      package : The imported package object.
  
      
docstring: Imports a python package into the current namespace.
  Parameters
  
  rel_path_to_package : str
  Path to the package containing director relative from this script's
  directory.
  package_name : str
  The name of the package to be imported.
  
  Returns
  
  package : The imported package object.
docstring_tokens: Imports a python package into the current namespace . Parameters rel_path_to_package : str Path to the package containing director relative from this script ' s directory . package_name : str The name of the package to be imported . Returns package : The imported package object .
code: def import_package(rel_path_to_package, package_name):
      
      """Imports a python package into the current namespace.
  
      Parameters
      --------
  
      rel_path_to_package : str
          Path to the package containing director relative from this script's
          directory.
      package_name : str
          The name of the package to be imported.
  
      Returns
      ---------
      package : The imported package object.
  
      """
      try:
          curr_dir = os.path.dirname(os.path.realpath(__file__))
      except NameError:
          curr_dir = os.path.dirname(os.path.realpath(os.getcwd()))
      package_path = os.path.join(curr_dir, rel_path_to_package)
      if package_path not in sys.path:
          sys.path = [package_path] + sys.path
      package = __import__(package_name)
      return package
code_tokens: def import_package ( rel_path_to_package , package_name ) : try : curr_dir = os . path . dirname ( os . path . realpath ( __file__ ) ) except NameError : curr_dir = os . path . dirname ( os . path . realpath ( os . getcwd ( ) ) ) package_path = os . path . join ( curr_dir , rel_path_to_package ) if package_path not in sys . path : sys . path = [ package_path ] + sys . path package = __import__ ( package_name ) return package
short_docstring: Imports a python package into the current namespace.
short_docstring_tokens: Imports a python package into the current namespace .
comment: """Imports a python package into the current namespace.
  
      Parameters
      --------
  
      rel_path_to_package : str
          Path to the package containing director relative from this script's
          directory.
      package_name : str
          The name of the package to be imported.
  
      Returns
      ---------
      package : The imported package object.
  
      """