def generate_unit_summary(namespace):
 docstring = io.StringIO()
 docstring.write(u'\n.. list-table:: Available Units\n   :header-rows: 1\n   :widths: 10 20 20 20 1\n\n   * - Unit\n     - Description\n     - Represents\n     - Aliases\n     - SI Prefixes\n')
 for unit_summary in _iter_unit_summary(namespace):
  docstring.write(u'\n   * - ``{0}``\n     - {1}\n     - {2}\n     - {3}\n     - {4!s:.1}\n'.format(*unit_summary))
 return docstring.getvalue()

def generate_unit_summary ( namespace ) : docstring = io . StringIO ( ) docstring . write ( u'\n.. list-table:: Available Units\n   :header-rows: 1\n   :widths: 10 20 20 20 1\n\n   * - Unit\n     - Description\n     - Represents\n     - Aliases\n     - SI Prefixes\n' ) for unit_summary in _iter_unit_summary ( namespace ) : docstring . write ( u'\n   * - ``{0}``\n     - {1}\n     - {2}\n     - {3}\n     - {4!s:.1}\n' . format ( * unit_summary ) ) return docstring . getvalue ( )
generates a summary of units from a given namespace .