def get_package(module_name, is_package):
    """Returns a string representing the package to which the file belongs."""
    if is_package:
        return module_name
    else:
        return '.'.join(module_name.split('.')[:-1])