'Output the unit in the given format as a string.
Parameters
format : `astropy.units.format.Base` instance or str
The name of a format or a formatter object.  If not
provided, defaults to the generic format.'

def to_string(self, format=unit_format.Generic):

    f = unit_format.get_format(format)
    return f.to_string(self)
