class_docstr: Keeps track of brackets on a line.
docstr: Return the number of delimiters with the given `priority`.
  
  If no `priority` is passed, defaults to max priority on the line.
docstr_tok: ["Return","the","number","of","delimiters","with","the","given","`","priority","`",".","If","no","`","priority","`","is","passed",",","defaults","to","max","priority","on","the","line","."]
code: def delimiter_count_with_priority(
      self, priority: Priority = 0
  ) -> int:
      """Return the number of delimiters with the given `priority`.
  
      If no `priority` is passed, defaults to max priority on the line.
      """
      if not self.delimiters:
          return 0
  
      priority = priority or self.max_delimiter_priority()
      return sum(1 for p in self.delimiters.values() if p == priority)
  
imports: from dataclasses import dataclass, field
  from typing import Dict, Final, Iterable, List, Optional, Sequence, Set, Tuple, Union
  from black.nodes import BRACKET, CLOSING_BRACKETS, COMPARATORS, LOGIC_OPERATORS, MATH_OPERATORS, OPENING_BRACKETS, UNPACKING_PARENTS, VARARGS_PARENTS, is_vararg, syms
  from blib2to3.pgen2 import token
  from blib2to3.pytree import Leaf, Node
label_desc: Use image node_id 5 for calling the BracketTracker obj's underlying member method code with example usage: obj.delimiter_count_with_priority(priority) and returns: sum, int