@pexdoc.pcontracts.new_contract()<EOL>def csv_col_sort(obj):
exdesc = pexdoc.pcontracts.get_exdesc()<EOL>obj = obj if isinstance(obj, list) else [obj]<EOL>if not obj:<EOL><INDENT>raise ValueError(exdesc)<EOL><DEDENT>for item in obj:<EOL><INDENT>if isinstance(item, bool) or (<EOL>(not isinstance(item, str))<EOL>and (not isinstance(item, int))<EOL>and (not isinstance(item, dict))<EOL>):<EOL><INDENT>raise ValueError(exdesc)<EOL><DEDENT>if isinstance(item, dict):<EOL><INDENT>keys = list(item.keys())<EOL>if (len(keys) > <NUM_LIT:1>) or (<EOL>(len(keys) == <NUM_LIT:1>)<EOL>and ((not isinstance(keys[<NUM_LIT:0>], int)) and (not isinstance(keys[<NUM_LIT:0>], str)))<EOL>):<EOL><INDENT>raise ValueError(exdesc)<EOL><DEDENT>value = item[keys[<NUM_LIT:0>]]<EOL>if value not in ["<STR_LIT:A>", "<STR_LIT:D>", "<STR_LIT:a>", "<STR_LIT:d>"]:<EOL><INDENT>raise ValueError(exdesc)<EOL><DEDENT><DEDENT><DEDENT>
r"""
    Validate if an object is a CsvColSort pseudo-type object.

    :param obj: Object
    :type  obj: any

    :raises:
     * RuntimeError (Argument \`*[argument_name]*\` is not valid). The token
       \*[argument_name]\* is replaced by the *name* of the argument the
       contract is attached to

    :rtype: None