def get_package_name(pkg_path):
    if ('/' not in pkg_path and pkg_path.endswith('.py')) or pkg_path == '.':
        return os.getcwd().split("/")[-1]

    return pkg_path.split('/')[0]
dataset/ETHPy150Open shaunvxc/envy/envy/application.py/get_package_name/original