class_docstr: Selector that accepts only entries that match provided field
  specifier(s). Only a limited set of specifiers is supported for now:
    <specifiers>::=<specifier>[<comma><specifiers>]
    <specifier>::=<field_name>[<type_delim><type>]<equal><value_or_range>
    <field_name> is a valid identifier
    <type> ::= "int" | "str"
    <equal> ::= "="
    <comma> ::= ","
    <type_delim> ::= ":"
    <value_or_range> ::= <value> | <range>
    <range> ::= <value><range_delim><value>
    <range_delim> ::= "-"
    <value> is a string without spaces and special symbols
      (e.g. <comma>, <equal>, <type_delim>, <range_delim>)
class_docstr_tok: ["Selector","that","accepts","only","entries","that","match","provided","field","specifier","(","s",")",".","Only","a","limited","set","of","specifiers","is","supported","for","now",":","<","specifiers",">",":",":=","<","specifier",">","[","<","comma",">","<","specifiers",">","]","<","specifier",">",":",":=","<","field_name",">","[","<","type_delim",">","<","type",">","]","<","equal",">","<","value_or_range",">","<","field_name",">","is","a","valid","identifier","<","type",">",":",":=","``","int","''","|","``","str","''","<","equal",">",":",":=","``","=","''","<","comma",">",":",":=","``",",","''","<","type_delim",">",":",":=","``",":","''","<","value_or_range",">",":",":=","<","value",">","|","<","range",">","<","range",">",":",":=","<","value",">","<","range_delim",">","<","value",">","<","range_delim",">",":",":=","``","-","''","<","value",">","is","a","string","without","spaces","and","special","symbols","(","e.g",".","<","comma",">",",","<","equal",">",",","<","type_delim",">",",","<","range_delim",">",")"]
code: def _parse_specifier_into_predicates(self, spec: str):
      predicates = []
      specs = spec.split(self._SPEC_DELIM)
      for subspec in specs:
          eq_idx = subspec.find(self._EQUAL)
          if eq_idx > 0:
              field_name_with_type = subspec[:eq_idx]
              field_name, field_type = self._parse_field_name_type(
                  field_name_with_type
              )
              field_value_or_range = subspec[eq_idx + 1 :]
              if self._is_range_spec(field_value_or_range):
                  vmin, vmax = self._get_range_spec(
                      field_value_or_range
                  )
                  predicate = (
                      FieldEntrySelector._FieldEntryRangePredicate(
                          field_name, field_type, vmin, vmax
                      )
                  )
              else:
                  predicate = (
                      FieldEntrySelector._FieldEntryValuePredicate(
                          field_name, field_type, field_value_or_range
                      )
                  )
              predicates.append(predicate)
          elif eq_idx == 0:
              self._parse_error(f'"{subspec}", field name is empty!')
          else:
              self._parse_error(
                  f'"{subspec}", should have format '
                  "<field>=<value_or_range>!"
              )
      return predicates
  
file_path: detectron2/projects/DensePose/densepose/utils/dbhelper.py
imports: from typing import Any, Dict, Optional, Tuple
label_desc: Use image node_id 3 for calling the FieldEntrySelector obj's underlying member method code with example usage: obj._parse_specifier_into_predicates(spec) and returns: predicates