parameters: (pretty_printers)
return_statement: return (enabled, total)
docstring: Return a 2-tuple of number of enabled and total printers.
docstring_summary: Return a 2-tuple of number of enabled and total printers.
docstring_tokens: Return a 2 - tuple of number of enabled and total printers .
function: def count_enabled_printers(pretty_printers):
      """Return a 2-tuple of number of enabled and total printers."""
      enabled = 0
      total = 0
      for printer in pretty_printers:
          if (hasattr(printer, "subprinters")
              and printer.subprinters is not None):
              if printer_enabled_p(printer):
                  for subprinter in printer.subprinters:
                      if printer_enabled_p(subprinter):
                          enabled += 1
              total += len(printer.subprinters)
          else:
              if printer_enabled_p(printer):
                  enabled += 1
              total += 1
      return (enabled, total)
function_tokens: def count_enabled_printers ( pretty_printers ) : enabled = 0 total = 0 for printer in pretty_printers : if ( hasattr ( printer , "subprinters" ) and printer . subprinters is not None ) : if printer_enabled_p ( printer ) : for subprinter in printer . subprinters : if printer_enabled_p ( subprinter ) : enabled += 1 total += len ( printer . subprinters ) else : if printer_enabled_p ( printer ) : enabled += 1 total += 1 return ( enabled , total )