def METHOD_NAME(job, output):
    """
    Goes through a series of possible OSes.
    If no match was found then set the job OS to "Other"
    """
    # This matches against the output of "lsb_release -a".
    if output_os_search(job, output, r"^Distributor ID:\s+(.+)$", r"^Release:\s+(.+)$", r"^Codename:\s+(.+)$"):
        return
    # This matches against the output of "systeminfo |grep '^OS'"
    if output_os_search(job, output, r"^OS Name:\s+(.+)$", r"^OS Version:\s+(.+)$", r"^OS Configuration:\s+(.+)$"):
        return
    # This matches against the output of "sw_vers".
    if output_os_search(job, output, r"^ProductName:\s+(.+)$", r"^ProductVersion:\s+(.+)$", r"^BuildVersion:\s+(.+)$"):
        return
    # No OS found
    os_record, created = models.OSVersion.objects.get_or_create(name="Other")
    job.operating_system = os_record