def interval_to_cat(interval, breakpoint):
    """Compare an MIC interval with a breakpoint and assign a resistance category.
    """
    x, y = interval
    assert x <= y

    if x >= breakpoint:
        return "R"
    elif y < breakpoint:
        return "S"
    else:
        return "NA"