code: def _descope_flag(self, flag, default_scope):
      
      for scope_prefix, scope_info in self._known_scoping_prefixes:
        for flag_prefix in ['--', '--no-']:
          prefix = flag_prefix + scope_prefix
          if flag.startswith(prefix):
            scope = scope_info.scope
            if scope_info.category == ScopeInfo.SUBSYSTEM and default_scope != GLOBAL_SCOPE:
              # We allow goal.task --subsystem-foo to refer to the task-level subsystem instance,
              # i.e., as if qualified by --subsystem-goal-task-foo.
              # Note that this means that we can't set a task option on the cmd-line if its
              # name happens to start with a subsystem scope.
              # TODO: Either fix this or at least detect such options and warn.
              task_subsystem_scope = '{}.{}'.format(scope_info.scope, default_scope)
              if task_subsystem_scope in self._known_scopes:  # Such a task subsystem actually exists.
                scope = task_subsystem_scope
            return scope, flag_prefix + flag[len(prefix):]
      return default_scope, flag
docs: If the flag is prefixed by its scope, in the old style, extract the scope.
  
      Otherwise assume it belongs to default_scope.
  
      returns a pair (scope, flag).