@staticmethod
def length_error(var1: list, var2: (list, int)) ->Exception:
    """
        Raise a ValueError exception
        :param var1: variable to check for length
        :param var2: variable or integer to compare with var1
        :return:
        """
    from optimus.helpers.debug import get_var_name
    if isinstance(var2, int):
        length_var2 = str(var2)
    else:
        length_var2 = str(len(var2))
    raise ValueError(
        "'{var2_name}' must be length '{var1_length}', received '{var2_length}'"
        .format(var2_name=get_var_name(var2), var1_length=str(len(var1)),
        var2_length=length_var2))
