If it is a list it will append the obj, if it is a dictionary
        it will convert it to a list and append
        :param obj: dict or list of the object to append
        :return: None
978175
def append(self, obj):
        
        if isinstance(obj, dict) and self._col_names:
            obj = [obj.get(col, None) for col in self._col_names]
        assert isinstance(obj, list), \
            "obj appended to ReprListList needs to be a list or dict"
        self._original.append(obj)
563388
def append(self, item):
        """"""
        if not isinstance(item, str):
            raise TypeError(
                'Members of this object must be strings. '
                'You supplied \"%s\"' % type(item))
        list.append(self, item)
301297
def __append_list(append_to, value):
    """"""
    if value is not None:
        if isinstance(value, list):
            append_to.extend(value)
        else:
            append_to.append(value)
235227
def dict_to_object(d):
    """"""
    top = type('CreateSendModel', (object,), d)
    seqs = tuple, list, set, frozenset
    for i, j in d.items():
        if isinstance(j, dict):
            setattr(top, i, dict_to_object(j))
        elif isinstance(j, seqs):
            setattr(top, i, type(j)(dict_to_object(sj) if isinstance(sj, dict) else sj for sj in j))
        else:
            setattr(top, i, j)
    return top
1350582
def split_obj (obj, prefix = None):
    '''
    
    '''
    # copy the object, optionally add the prefix before each key

    new = obj.copy() if prefix is None else { '{}_{}'.format(prefix, k): v for k, v in obj.items() }

    # try to find the key holding the subobject or a list of subobjects
    for k, v in new.items():
        # list of subobjects
        if isinstance(v, list):
            # this is a list of strings or ints, which is a one-to-many
            # can't deal with that here, but leave the data in case it's 
            # useful downstream
            if not isinstance(v[0], dict):
                new[k] = ','.join(v)
                return new, None, None
            del new[k]
            return new, k, v
        # or just one subobject
        elif isinstance(v, dict):
            del new[k]
            return new, k, [v]
    return new, None, None
981619
def append(self, other):
        

        to_concat = [self]

        if isinstance(other, (list, tuple)):
            to_concat = to_concat + list(other)
        else:
            to_concat.append(other)

        for obj in to_concat:
            if not isinstance(obj, Index):
                raise TypeError('all inputs must be Index')

        names = {obj.name for obj in to_concat}
        name = None if len(names) > 1 else self.name

        return self._concat(to_concat, name)
309376
def listify(obj, ignore=(list, tuple, type(None))):
    '''  '''
    return obj if isinstance(obj, ignore) else [obj]
356212
def fromDict(cls, _dict):
        
        obj = cls()
        obj.__dict__.update(_dict)
        return obj
476552
def basic_sobject_to_dict(obj):
    
    if not hasattr(obj, '__keylist__'):
        return obj
    data = {}
    fields = obj.__keylist__
    for field in fields:
        val = getattr(obj, field)
        if isinstance(val, list):
            data[field] = []
            for item in val:
                data[field].append(basic_sobject_to_dict(item))
        else:
            data[field] = basic_sobject_to_dict(val)
    return data
605835
def add(self, *obj_or_objs):
        
        objs = obj_or_objs
        if not isinstance(obj_or_objs, (list, tuple)):
            objs = (obj_or_objs, )
        change = operation.Relation(objs, ())
        self.parent.set(self.key, change)
        self.target_class_name = change._target_class_name
617807
def compile_obj(self, obj):
        
        res = {}
        for column in self.columns:
            if isinstance(column['__col__'], ColumnProperty):
                value = self._get_column_value(obj, column)

            elif isinstance(column['__col__'], RelationshipProperty):
                value = self._get_relationship_value(obj, column)

            res[column['name']] = value

        return res
565612
def serialize(obj, **options):
    '''
    
    '''

    try:
        if not isinstance(obj, dict):
            raise TypeError("configparser can only serialize dictionaries, not {0}".format(type(obj)))
        fp = options.pop('fp', None)
        if six.PY3:
            cp = configparser.ConfigParser(**options)
        else:
            cp = configparser.SafeConfigParser(**options)
        _read_dict(cp, obj)

        if fp:
            return cp.write(fp)
        else:
            s = six.moves.StringIO()
            cp.write(s)
            return s.getvalue()
    except Exception as error:
        raise SerializationError(error)
815770
def merge_dicts(i):
    

    a=i['dict1']
    b=i['dict2']

    for k in b:
        v=b[k]
        if type(v) is dict:
           if k not in a:
              a.update({k:b[k]})
           elif type(a[k])==dict:
              merge_dicts({'dict1':a[k], 'dict2':b[k]})
           else:
              a[k]=b[k]
        elif type(v) is list:
           a[k]=[]
           for y in v:
               a[k].append(y)
        else:
           a[k]=b[k]

    return {'return':0, 'dict1':a}
1116057
def transform_list_to_dict(list):
    

    ret = {}

    for value in list:
        if isinstance(value, dict):
            ret.update(value)
        else:
            ret[str(value)] = True

    return ret
1227971
def make_iterable(obj, default=None):
    
    if obj is None:
        return default or []
    if isinstance(obj, (compat.string_types, compat.integer_types)):
        return [obj]
    return obj
1241952
def to_json(obj, indent=4, sort_keys=True, **kwargs):
    
    obj_dict = to_dict(obj, **kwargs)
    return json.dumps(obj_dict, indent=indent, sort_keys=sort_keys)
1079099
def dict(self):
        
        return_obj = {}
        for attr in dir(self):
            if not attr.startswith('__') and attr not in self.__reserved:
                if isinstance(getattr(self, attr), list):
                    return_val = []
                    for item in getattr(self, attr):
                        if isinstance(item, DictClass):
                            return_val.append(dict(item))
                        else:
                            return_val.append(item)
                elif isinstance(getattr(self, attr), dict):
                    return_val = {}
                    for key, item in getattr(self, attr).items():
                        if isinstance(item, DictClass):
                            return_val[key] = item.dict()
                        else:
                            return_val[key] = item
                elif isinstance(getattr(self, attr), DictClass):
                    return_val = getattr(self, attr).dict()
                else:
                    return_val = getattr(self, attr)
                return_obj[attr] = return_val
        return return_obj