class_docstr: A simple pyparsing-based parser for fontconfig-style patterns.
  
  See the `fontconfig pattern specification
  <https://www.freedesktop.org/software/fontconfig/fontconfig-user.html>`_
  for more information.
class_docstr_tok: ["A","simple","pyparsing-based","parser","for","fontconfig-style","patterns",".","See","the","`","fontconfig","pattern","specification","<","https",":","\/\/www.freedesktop.org\/software\/fontconfig\/fontconfig-user.html",">","`","_","for","more","information","."]
docstr: Parse the given fontconfig *pattern* and return a dictionary
  of key/value pairs useful for initializing a
  :class:`font_manager.FontProperties` object.
docstr_tok: ["Parse","the","given","fontconfig","*","pattern","*","and","return","a","dictionary","of","key\/value","pairs","useful","for","initializing","a",":","class",":","`","font_manager.FontProperties","`","object","."]
code: def parse(self, pattern):
      """
      Parse the given fontconfig *pattern* and return a dictionary
      of key/value pairs useful for initializing a
      :class:`font_manager.FontProperties` object.
      """
      props = self._properties = {}
      try:
          self._parser.parseString(pattern)
      except self.ParseException as e:
          raise ValueError(
              "Could not parse font string: '%s'\n%s" % (pattern, e)
          )
  
      self._properties = None
  
      self._parser.resetCache()
  
      return props
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/fontconfig_pattern.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import re
  from pyparsing import Literal, ZeroOrMore, Optional, Regex, StringEnd, ParseException, Suppress
label_desc: Use image node_id 2 for calling the FontconfigPatternParser obj's underlying member method code with example usage: obj.parse(pattern) and returns: props