code: def auto_populate(mode='all'):
      
      current_population_mode = settings.AUTO_POPULATE
      settings.AUTO_POPULATE = mode
      try:
          yield
      finally:
          settings.AUTO_POPULATE = current_population_mode
docs: Overrides translation fields population mode (population mode decides which
      unprovided translations will be filled during model construction / loading).
  
      Example:
  
          with auto_populate('all'):
              s = Slugged.objects.create(title='foo')
          s.title_en == 'foo' // True
          s.title_de == 'foo' // True
  
      This method may be used to ensure consistency loading untranslated fixtures,
      with non-default language active:
  
          with auto_populate('required'):
              call_command('loaddata', 'fixture.json')