code: def get_stats(self, pattern, with_descriptions):
          
          if not isinstance(pattern, basestring):
              raise TypeError("pattern can only be an instance of type basestring")
          if not isinstance(with_descriptions, bool):
              raise TypeError("with_descriptions can only be an instance of type bool")
          stats = self._call("getStats",
                       in_p=[pattern, with_descriptions])
          return stats
docs: Get the VM statistics in a XMLish format.
  
          in pattern of type str
              The selection pattern. A bit similar to filename globbing.
  
          in with_descriptions of type bool
              Whether to include the descriptions.
  
          return stats of type str
              The XML document containing the statistics.