def METHOD_NAME(
        *,
        ctx,
        target,
        product_name,
        product_type,
        module_name_attribute,
        is_resource_bundle = False,
        bundle_file = None,
        bundle_path = None,
        bundle_file_path = None,
        archive_file_path = None,
        executable_name = None,
        linker_inputs):
    """Generates information about the target's product.
    Args:
        ctx: The aspect context.
        target: The `Target` the product information is gathered from.
        product_name: The name of the product (i.e. the "PRODUCT_NAME" build
            setting).
        product_type: A PBXProductType string. See
            https://github.com/tuist/XcodeProj/blob/main/Sources/XcodeProj/Objects/Targets/PBXProductType.swift
            for examples.
        module_name_attribute: The `module_name` attribute of `target`.
        is_resource_bundle: Whether the product is a resource bundle.
        bundle_file: If the product is a bundle, this is `File` for the bundle,
            otherwise `None`.
        bundle_path: If the product is a bundle, this is the path to
            the bundle, when not in an archive, otherwise `None`.
        bundle_file_path: If the product is a bundle, this is the `file_path` to
            the bundle, when not in an archive, otherwise `None`.
        archive_file_path: If the product is a bundle, this is
            `file_path` to the bundle, possibly in an archive, otherwise `None`.
        executable_name: If the product is a bundle, this is the executable
            name, otherwise `None`.
        linker_inputs: A value returned by `linker_input_files.collect`.
    Returns:
        A `struct` containing the name, the path to the product and the product type.
    """
    if bundle_file_path:
        file = bundle_file
        basename = paths.basename(bundle_file_path)
        fp = bundle_file_path
        actual_fp = archive_file_path
    elif target[DefaultInfo].files_to_run.executable:
        executable = target[DefaultInfo].files_to_run.executable
        file = _codesign_executable(ctx = ctx, executable = executable)
        basename = file.basename
        fp = executable.path
        actual_fp = fp
    elif CcInfo in target and linker_inputs and target.files != depset():
        file = linker_input_files.get_primary_static_library(linker_inputs)
        basename = file.basename if file else None
        fp = file.path if file else None
        actual_fp = fp
    else:
        file = None
        basename = None
        fp = None
        actual_fp = None
    if bundle_path:
        path = bundle_path
    elif file:
        path = file.path
    else:
        path = None
    if target and apple_common.AppleDynamicFramework in target:
        framework_files = (
            target[apple_common.AppleDynamicFramework].framework_files
        )
    else:
        framework_files = EMPTY_DEPSET
    if target and apple_common.AppleExecutableBinary in target:
        executable = target[apple_common.AppleExecutableBinary].binary
    else:
        executable = None
    if target:
        label = target.label
        package_dir = paths.join(
            label.workspace_name,
            ctx.bin_dir.path,
            label.package,
        )
    else:
        package_dir = None
    return struct(
        executable = executable,
        executable_name = executable_name,
        name = product_name,
        module_name_attribute = module_name_attribute,
        framework_files = framework_files,
        file = file,
        path = path,
        basename = basename,
        file_path = fp,
        actual_file_path = actual_fp,
        package_dir = package_dir,
        type = product_type,
        is_resource_bundle = is_resource_bundle,
    )