def _check_format_string(self, node, format_arg):
num_args = _count_supplied_tokens(node.args[format_arg + <NUM_LIT:1> :])<EOL>if not num_args:<EOL><INDENT>return<EOL><DEDENT>format_string = node.args[format_arg].value<EOL>if not isinstance(format_string, str):<EOL><INDENT>required_num_args = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>if self._format_style == "<STR_LIT>":<EOL><INDENT>keyword_args, required_num_args, _, _ = utils.parse_format_string(<EOL>format_string<EOL>)<EOL>if keyword_args:<EOL><INDENT>return<EOL><DEDENT><DEDENT>elif self._format_style == "<STR_LIT>":<EOL><INDENT>keyword_arguments, implicit_pos_args, explicit_pos_args = utils.parse_format_method_string(<EOL>format_string<EOL>)<EOL>keyword_args_cnt = len(<EOL>set(k for k, l in keyword_arguments if not isinstance(k, int))<EOL>)<EOL>required_num_args = (<EOL>keyword_args_cnt + implicit_pos_args + explicit_pos_args<EOL>)<EOL><DEDENT><DEDENT>except utils.UnsupportedFormatCharacter as ex:<EOL><INDENT>char = format_string[ex.index]<EOL>self.add_message(<EOL>"<STR_LIT>",<EOL>node=node,<EOL>args=(char, ord(char), ex.index),<EOL>)<EOL>return<EOL><DEDENT>except utils.IncompleteFormatString:<EOL><INDENT>self.add_message("<STR_LIT>", node=node)<EOL>return<EOL><DEDENT><DEDENT>if num_args > required_num_args:<EOL><INDENT>self.add_message("<STR_LIT>", node=node)<EOL><DEDENT>elif num_args < required_num_args:<EOL><INDENT>self.add_message("<STR_LIT>", node=node)<EOL><DEDENT>
Checks that format string tokens match the supplied arguments.

        Args:
          node (astroid.node_classes.NodeNG): AST node to be checked.
          format_arg (int): Index of the format string in the node arguments.