def METHOD_NAME(version, version_range):
    if version_range is None or not version:
        return True
    # For the purposes of upgrade comparison, treat dev versions as alphas
    version = normalize_version_to_semver(version).replace("dev", "a")
    version_range = "".join(get_version_and_operator_from_range(version_range))
    return match(version, version_range)