<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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