def __get_dtype(typespec):
if '<STR_LIT:type>' in typespec:<EOL><INDENT>return __TYPE_MAP__.get(typespec['<STR_LIT:type>'], np.object_)<EOL><DEDENT>elif '<STR_LIT>' in typespec:<EOL><INDENT>return np.object_<EOL><DEDENT>elif '<STR_LIT>' in typespec:<EOL><INDENT>types = [__get_dtype(v) for v in typespec['<STR_LIT>']]<EOL>if all([t == types[<NUM_LIT:0>] for t in types]):<EOL><INDENT>return types[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>return np.object_<EOL>
Get the dtype associated with a jsonschema type definition

    Parameters
    ----------
    typespec : dict
        The schema definition

    Returns
    -------
    dtype : numpy.dtype
        The associated dtype