def METHOD_NAME(variable_name):
    left_bracket_count = variable_name.count('[')
    right_bracket_count = variable_name.count(']')
    if (left_bracket_count == 1) and (right_bracket_count == 1):
        return True
    elif (left_bracket_count == 1) or (right_bracket_count == 1):
        raise ValueError("Illegally formed variable name="+variable_name+"; if indexed, variable names must contain matching left and right brackets")
    else:
        return False