def init_name_map(self):
        cache = {}
        # We intentionally handle related m2m objects first so that symmetrical
        # m2m accessor names can be overridden, if necessary.
        for f, model in self.get_all_related_m2m_objects_with_model():
            cache[f.field.related_query_name()] = (f, model, False, True)
        for f, model in self.get_all_related_objects_with_model():
            cache[f.field.related_query_name()] = (f, model, False, False)
        for f, model in self.get_m2m_with_model():
            cache[f.name] = (f, model, True, True)
        for f, model in self.get_fields_with_model():
            cache[f.name] = (f, model, True, False)
        for f in self.virtual_fields:
            if hasattr(f, 'related'):
                cache[f.name] = (f.related, None if f.model == self.model else f.model, True, False)
        if app_cache_ready():
            self._name_map = cache
        return cache
Pickle an object into a file.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/options.py/Options.init_name_map--crossover with--dataset/ETHPy150Open aalto-speech/morfessor/morfessor/io.py/MorfessorIO.write_binary_file