def validate_string_dict(dct):
    for k,v in iteritems(dct):
        if not isinstance(k, string_types):
            raise ValueError('key %r in dict must be a string' % k)
        if not isinstance(v, string_types):
            raise ValueError('value %r in dict must be a string' % v)
Validate that the input is a dict with string keys and values.
dataset/ETHPy150Open jupyter/jupyter_client/jupyter_client/client.py/validate_string_dict