def parse_dtypes(df, value):
    """
    Get the data type from a string data type representation. for example 'StringType' from 'string'
    :param value:
    :param df:
    :return:
    """
    if not isinstance(value, list):
        value = [value]
    try:
        data_type = [df.constants.DTYPES_DICT[df.constants.SHORT_DTYPES[v]] for v in value]
    except KeyError:
        data_type = value

    if isinstance(data_type, list) and len(data_type) == 1:
        result = data_type[0]
    else:
        result = data_type
    return result