code: def find_directives(text, klass):
      
      directives = []
      for directive in parse_str(text):
          method = klass.__getattribute__(directive[0])
          args = directive[1:]
          directives.append((method, args))
      return directives
docs: Find directives on class ``klass`` in string ``text``.
  
      Returns list of ``(method, args)`` tuples.
  
      .. versionadded:: 0.9.0
  
      :param text: String containing directives.
      :type text: str
      :type klass: object
      :rtype: list