def update(self, obj, cacheNames=None):
        if cacheNames is None:
            cacheNames = self.cacheNames()
            
        if isinstance(obj, dict):
            for key, val in obj.iteritems():
                setattr(self, key, val)
        elif isinstance(obj, (list, tuple)):
            if len(obj) != len(cacheNames):
                raise ValueError('length of update object (%d) did not match length of cache names (%d)' % (len(obj), len(cacheNames)))
            for newVal, name in zip(obj, cacheNames):
                setattr(self, name, newVal)
        else:
            for cacheName in cacheNames:
                setattr(self, cacheName, getattr(obj, cacheName))
function to load a pickle file
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/internal/startup.py/SubItemCache.update--crossover with--dataset/ETHPy150Open sisl/Chimp/chimp/agents/dqn_agent.py/DQNAgent.load