parameters: (self)
return_statement: return ret
docstring: Return a histogram of pg state values
docstring_summary: Return a histogram of pg state values
docstring_tokens: Return a histogram of pg state values
function: def compile_pg_status(self):
          """
          Return a histogram of pg state values
          """
          ret = {}
          j = self.get_pg_stats()
          for pg in j:
              for status in pg['state'].split('+'):
                  if status not in ret:
                      ret[status] = 0
                  ret[status] += 1
          return ret
function_tokens: def compile_pg_status ( self ) : ret = { } j = self . get_pg_stats ( ) for pg in j : for status in pg [ 'state' ] . split ( '+' ) : if status not in ret : ret [ status ] = 0 ret [ status ] += 1 return ret