def format_name(name, initials_only=False):
return ParsedName.loads(name).pprint(initials_only)<EOL>
Format a schema-compliant name string in a human-friendy format.

    This is a convenience wrapper around :ref:`ParsedName`, which should be
    used instead if more features are needed.

    Args:
        name (str): The name to format, in pretty much any format.
        initials_only (bool): ``True`` if we want the first names to be displayed with only the initial followed by a dot. ``False`` otherwise.

    Examples:
    >>> format_name('Lieber, Stanley Martin')
    u'Stanley Martin Lieber'
    >>> format_name('Lieber, Stanley Martin', initials_only=True)
    u'S. M. Lieber'
    >>> format_name('Downey, Robert Jr.', initials_only=True)
    u'R. Downey Jr.'