(i)
return i
Resolves observation into JSONable types by looping over every element
    in it
Resolves observation into JSONable types by looping over every element
    in it
Resolves observation into JSONable types by looping over every element in it
def resolve_classes(i):
    """Resolves observation into JSONable types by looping over every element
    in it"""
    if isinstance(i, tuple):
        i = list(i)
    for key, value in enumerate(i):
        if isinstance(i, dict):
            key = value
            value = i[key]
        if hasattr(value, '__iter__') and not isinstance(
                i[key], str) and not isinstance(i[key], numpy.ndarray):
            i[key] = resolve_classes(value)
        elif isinstance(value, enum.Enum):
            i[key] = str(value.name)
        elif isinstance(value, numpy.ndarray):
            i[key] = value.tolist()
        elif isinstance(value, numpy.uint8) or isinstance(value, numpy.int64):
            i[key] = int(value)
    return i
def resolve_classes ( i ) : if isinstance ( i , tuple ) : i = list ( i ) for key , value in enumerate ( i ) : if isinstance ( i , dict ) : key = value value = i [ key ] if hasattr ( value , '__iter__' ) and not isinstance ( i [ key ] , str ) and not isinstance ( i [ key ] , numpy . ndarray ) : i [ key ] = resolve_classes ( value ) elif isinstance ( value , enum . Enum ) : i [ key ] = str ( value . name ) elif isinstance ( value , numpy . ndarray ) : i [ key ] = value . tolist ( ) elif isinstance ( value , numpy . uint8 ) or isinstance ( value , numpy . int64 ) : i [ key ] = int ( value ) return i