from pathlib import Path


def is_package_file(f: Path, sap_code: str, name_pattern: str) -> bool:
    """Determine if the file is the right application JSON file
    :param f (Path): json file path
    :param sap_code (str): Adobe SAP code for product being processed
    :param name_pattern (str): json filename patter to test"""
    return sap_code in str(f) and name_pattern in str(f)