def validate_vector(obj, throwerr=False):
    """
    Given an object obj, check if it is a valid raw representation of a real
    mathematical vector. An accepted object would:
        1. be a Python list or Python tuple
        2. be 2 or 3 items in length

    :param obj: Test subject
    :param throwerr: Raise an error if the check returns false.
    :return: True if obj is a valid raw representation of mathematical vectors,
    False otherwise
    """
    if isinstance(obj, (list, tuple)) and 1 < len(obj) < 4:
        return True
    else:
        if throwerr:
            raise TypeError("A given object is not an accepted representation"
                            " of a vector (must be a Python list or tuple)")
        return False