def METHOD_NAME(self, args):
    minimum_duration_to_log = None
    if len(args) > 0:
        try:
            minimum_duration_to_log = int(args[0])
        except ValueError:
            pass
    while minimum_duration_to_log is None:
        try:
            answer = input("Minimum duration to log? Defaults to " "1000(ms) ")
            if answer == "":
                minimum_duration_to_log = 1000
            else:
                minimum_duration_to_log = int(answer)
        except ValueError:
            print("Valid integer needed")
    return minimum_duration_to_log