def add_boolean_flag(self, name, default=False, pair=True, help=None):
        """Add a boolean flag to argparse parser.

        Args:
            parser: argparse.Parser
                parser to add the flag to
            name: str
                --<name> will enable the flag, while --no-<name> will disable it
            default: bool or None
                default value of the flag
            pair:
                True to add both --myflag and --no-myflag
            help: str
                help string for the flag
        """
        self.parser.add_argument("--" + name,
                                 action="store_true", default=default, help=help)
        if pair:
            self.parser.add_argument("--no-" + name,
                                     action="store_false", dest=name)
Add a boolean flag to argparse parser.

        Args:
            parser: argparse.Parser
                parser to add the flag to
            name: str
                --<name> will enable the flag, while --no-<name> will disable it
            default: bool or None
                default value of the flag
            pair:
                True to add both --myflag and --no-myflag
            help: str
                help string for the flag
        
surreal/utils/common.py