def get_package_name_or_location(package_json):
    """Get the name of package from package.json, or file location if missing."""
    if 'package_name' in package_json:
        return package_json['package_name']
    else:
        assert 'package_location' in package_json
        return package_json['package_location']