def METHOD_NAME(self, data, package_name):
    affected_version_range = None
    unaffected_version_range = None
    fixed_version = None
    vulnerable_range = data.get("vulnerable_versions") or ""
    patched_range = data.get("patched_versions") or ""
    # https://github.com/nodejs/security-wg/blob/cfaa51cc5c83f01eea61b69658f7bc76a77c5979/vuln/npm/213.json#L14
    if vulnerable_range == "<=99.999.99999":
        vulnerable_range = "*"
    if vulnerable_range:
        affected_version_range = NpmVersionRange.from_native(vulnerable_range)
    # https://github.com/nodejs/security-wg/blob/cfaa51cc5c83f01eea61b69658f7bc76a77c5979/vuln/npm/213.json#L15
    if patched_range == "<0.0.0":
        patched_range = None
    if patched_range:
        unaffected_version_range = NpmVersionRange.from_native(patched_range)
    # We only store single fixed versions and not a range of fixed versions
    # If there is a single constraint in the unaffected_version_range
    # having comparator as ">=" then we store that as the fixed version
    if unaffected_version_range and len(unaffected_version_range.constraints) == 1:
        constraint = unaffected_version_range.constraints[0]
        if constraint.comparator == ">=":
            fixed_version = constraint.version
    return AffectedPackage(
        package=PackageURL(
            type="npm",
            name=package_name,
        ),
        affected_version_range=affected_version_range,
        fixed_version=fixed_version,
    )