code: def sync_luigi_config(self, push=True, pull=True, expand=True):
          
          prefix = "luigi_"
          lparser = luigi.configuration.LuigiConfigParser.instance()
  
          if push:
              for section in self.sections():
                  if not section.startswith(prefix):
                      continue
                  lsection = section[len(prefix):]
  
                  if not lparser.has_section(lsection):
                      lparser.add_section(lsection)
  
                  for option in self.options(section):
                      if not lparser.has_option(lsection, option):
                          if expand:
                              value = self.get_expanded(section, option)
                          else:
                              value = self.get(section, option)
                          lparser.set(lsection, option, value)
  
          if pull:
              for lsection in lparser.sections():
                  section = prefix + lsection
  
                  if not self.has_section(section):
                      self.add_section(section)
  
                  for option, value in lparser.items(lsection):
                      self.set(section, option, value)
docs: Synchronizes sections starting with ``"luigi_"`` with the luigi configuration parser. First,
          when *push* is *True*, options that exist in law but **not** in luigi are stored as defaults
          in the luigi config. Then, when *pull* is *True*, all luigi-related options in the law
          config are overwritten with those from luigi. This way, options set via luigi defaults
          (environment variables, global configuration files, `LUIGI_CONFIG_PATH`) always have
          precendence. When *expand* is *True*, environment variables are expanded before pushing them
          to the luigi config.