code: def _config_parser_constrained(self, read_only):
          
          try:
              pc = self.parent_commit
          except ValueError:
              pc = None
          # end handle empty parent repository
          parser = self._config_parser(self.repo, pc, read_only)
          parser.set_submodule(self)
          return SectionConstraint(parser, sm_section(self.name))
docs: :return: Config Parser constrained to our submodule in read or write mode