def _format_shared(obj, indent):
    """Format the common shared attributes in the same manner."""
    if obj is None:
        return []
    lines = []
    for attr_name in ('uuid', 'state'):
        if not hasattr(obj, attr_name):
            continue
        lines.append('%s- %s = %s' % (' ' * indent, attr_name, getattr(obj,
            attr_name)))
    return lines
