def METHOD_NAME():
    avg = 0
    ver = 0
    run = 0
    help = 0
    check = 0
    runtime = 5
    degree = 0
    seccount = 0
    seclast = 0
    minutes = 0
    temp = 21
    tsum = 0
    ticker = 0
    exitmsg = ""
    try:
        opts, args = getopt.getopt(sys.argv[1:], "aCFKs:hV", [
                                   "average", "celsius", "kelvin", "fahrenheit", "seconds=", "help", "version"])
    except getopt.GetoptError:
        help = 1
        check = 1
        exitmsg = "Argument not recognized."
        usageinfo(check, run, exitmsg)
    if check == 0:
        for opt, arg in opts:
            if opt in ("-h", "--help"):
                help = 1
            if opt in ("-C", "--celsius"):
                degree = "Celsius"
            if opt in ("-F", "--fahrenheit"):
                degree = "Fahrenheit"
            if opt in ("-K", "--kelvin"):
                degree = "Kelvin"
            if opt in ("-V", "--version"):
                ver = 1
            if opt in ("-s", "--seconds"):
                run = 1
                runtime = arg
            if opt in ("-a", "--average"):
                avg = 1
                run = 1
    if ver == 1:
        sys.exit()
    if help == 1:
        usageinfo(check, run, exitmsg)
    if run == 1:
        runtime = rtcheck(runtime)
        if runtime < 1:
            help = 1
            exitmsg = "Seconds must be defined as an integer greater than zero."
            usageinfo()
    hardware = hwcheck()
    if hardware == 0:
        print("Sorry, your hardware is not yet supported.")
        sys.exit()
    if avg == 1 and degree == 0:
        degree = "Fahrenheit"
    elif degree == 0:
        degree = getDegree()
    import datetime
    import time
    prevtemp = 21
    tmax = 0
    tmin = 1000
    bseconds = int(time.time())
    if avg == 0:
        print("Press Ctrl+C to exit")
    try:
        while True:
            temp = getTemp(hardware)
            tick = int(time.time()) - int(bseconds)
            seccount = int(seccount) + int(tick) - int(seclast)
            seclast = tick
            if seccount >= 60:
                minutes = int(minutes) + 1
                seccount = int(seccount) - 60
            seconds = int(tick) - (60 * int(minutes))
            temp = float(temp)
            if prevtemp > 20 and temp < 18:
                temp = temp * 10
            prevtemp = temp
            temp = convertDegree(degree, temp)
            if avg == 0:
                dispTemp(temp, degree, minutes, seconds)
            if temp < tmin:
                tmin = temp
            if temp > tmax:
                tmax = temp
            tsum = float(tsum) + float(temp)
            ticker = int(ticker) + 1
            if run == 1 and runtime <= seccount:
                break
            time.sleep(1)
            sys.stdout.flush()
    # When Ctrl-C is pressed, show summary data
    except KeyboardInterrupt:
        pass
    tavg = tsum / ticker
    tavg = round(tavg, 1)
    if avg == 0:
        print("\n\nHighest recorded temperature was",
              tmax, "degrees", degree, ".")
        print("Lowest recorded temperature was", tmin, "degrees", degree, ".")
    print("Average temperature was", tavg, "degrees", degree, ".\n")
    import os
    if avg == 1:
        return 0
    elif os.path.exists("/var/log/cputemp.log") and avg == 0:
        tod = datetime.datetime.now()
        templog = open("/var/log/cputemp.log", "a")
        templog.write("Session started at ")
        templog.write(str(tod))
        templog.write("\b\b\b\b\b\b\b :      \n")
        templog.write("cputemp ")
        templog.write(" was run for ")
        templog.write(str(minutes))
        templog.write(" : ")
        if seconds < 10:
            templog.write("0")
        templog.write(str(seconds))
        templog.write(".\n")
        templog.write("Highest recorded temperature was ")
        templog.write(str(tmax))
        templog.write(" degrees ")
        templog.write(str(degree))
        templog.write(".\n")
        templog.write("Lowest recorded temperature was ")
        templog.write(str(tmin))
        templog.write(" degrees ")
        templog.write(str(degree))
        templog.write(".\n")
        templog.write("Average temperature was ")
        templog.write(str(tavg))
        templog.write(" degrees ")
        templog.write(str(degree))
        templog.write(".\n")
        templog.write("---------------\n\n")
        print("Log has been updated")
    else:
        print("Could not locate log file.  Please re-install.")
        return 1