def METHOD_NAME(ctx):
    build_dir = ctx['BUILD_DIR']
    webdir = ctx['WEBDIR']
    json_path = None
    lock_path = None
    json_paths = [
        os.path.join(build_dir, 'composer.json'),
        os.path.join(build_dir, webdir, 'composer.json')
    ]
    lock_paths = [
        os.path.join(build_dir, 'composer.lock'),
        os.path.join(build_dir, webdir, 'composer.lock')
    ]
    env_path = os.getenv('COMPOSER_PATH')
    if env_path is not None:
        json_paths = json_paths + [
            os.path.join(build_dir, env_path, 'composer.json'),
            os.path.join(build_dir, webdir, env_path, 'composer.json')
        ]
        lock_paths = lock_paths + [
            os.path.join(build_dir, env_path, 'composer.lock'),
            os.path.join(build_dir, webdir, env_path, 'composer.lock')
        ]
    for path in json_paths:
        if os.path.exists(path):
            json_path = path
    for path in lock_paths:
        if os.path.exists(path):
            lock_path = path
    return (json_path, lock_path)