Specifies that a flag is a key flag for a module.

    Args:
      module_name: str, the name of a Python module.
      flag: Flag, the Flag instance that is key to the module.
171676
def register_key_flag_for_module(self, module_name, flag):
    
    key_flags_by_module = self.key_flags_by_module_dict()
    # The list of key flags for the module named module_name.
    key_flags = key_flags_by_module.setdefault(module_name, [])
    # Add flag, but avoid duplicates.
    if flag not in key_flags:
      key_flags.append(flag)
1011447
def set(self, name, value):
        
        flag = self.flags[name]
        self._value = (self.value | flag) if value else (self.value & ~flag)
164458
public boolean isAttrFlagSet(String name, int flags)
    {
        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    }
108434
def flags(flags):
        
        names = sorted(
            descr for key, descr in OpCodeDebug.STREAM_CONSTANT.items() if key & flags
        )
        return ", ".join(names)
1144544
def _setattr_wrapper(mod, key, value):
    
    setattr(mod, key, value)
    if mod == _thismodule:
        setattr(_sys.modules[__name__], key, value)
807879
def register(self, name):
        
        signal = Signal(providing_args=['args', 'kwargs'])
        self._registry[name] = signal
        return signal
661602
def _RegisterFlagByModuleId(self, module_id, flag):
    
    flags_by_module_id = self.FlagsByModuleIdDict()
    flags_by_module_id.setdefault(module_id, []).append(flag)
575606
def register_flag_by_module_id(self, module_id, flag):
    
    flags_by_module_id = self.flags_by_module_id_dict()
    flags_by_module_id.setdefault(module_id, []).append(flag)
518812
def _render_our_module_flags(self, module, output_lines, prefix=''):
    """"""
    flags = self._get_flags_defined_by_module(module)
    if flags:
      self._render_module_flags(module, flags, output_lines, prefix)
1290989
def DEFINE_string(flag_name, default_value, docstring, required=False):  # pylint: disable=invalid-name
    
    _define_helper(flag_name, default_value, docstring, str, required)
1366999
def get_flag_value(self, name, default):  # pylint: disable=invalid-name
    

    value = self.__getattr__(name)
    if value is not None:  # Can't do if not value, b/c value might be '0' or ""
      return value
    else:
      return default
893172
def _get_module_name(module):
    
    name = module.__name__[:-6] if module.__name__.endswith('Module') else module.__name__
    return name.lower()
1127418
def aimport_module(self, module_name):
        
        self.mark_module_reloadable(module_name)

        import_module(module_name)
        top_name = module_name.split('.')[0]
        top_module = sys.modules[top_name]
        return top_module, top_name
430174
def legal_module_name(self, name):
        
        if name in self._legal_mnames:
            return self._legal_mnames[name]

        for part in name.split('.'):
            try:
                exec("%s = 42" % part, {}, {})
            except:  # pragma: nocover
                self._legal_mnames[name] = False
                return False
        self._legal_mnames[name] = True
        return True
91682
def _define_absl_flags(self, absl_flags):
    """"""
    key_flags = set(absl_flags.get_key_flags_for_module(sys.argv[0]))
    for name in absl_flags:
      if name in _BUILT_IN_FLAGS:
        # Do not inherit built-in flags.
        continue
      flag_instance = absl_flags[name]
      # Each flags with short_name appears in FLAGS twice, so only define
      # when the dictionary key is equal to the regular name.
      if name == flag_instance.name:
        # Suppress the flag in the help short message if it's not a main
        # module's key flag.
        suppress = flag_instance not in key_flags
        self._define_absl_flag(flag_instance, suppress)
1141767
def check_module_name(self, name, offset=0):
        
        if name in ["general"]:
            return
        split_name = name.split()
        if len(split_name) > 1 and split_name[0] in I3S_SINGLE_NAMES:
            self.current_token -= len(split_name) - 1 - offset
            self.error("Invalid name cannot have 2 tokens")
        if len(split_name) > 2:
            self.current_token -= len(split_name) - 2 - offset
            self.error("Invalid name cannot have more than 2 tokens")
87453
def flag_arg(key, desc, opts = {}, &block)
            self << ArgParser::FlagArgument.new(key, desc, opts, &block)
        end