def _format_field_name(attr):
    """Format an object attribute in a human-friendly way."""
    parts = attr.rsplit(':', 1)
    name = parts[-1].replace('_', ' ')
    if name.isupper() or name.islower():
        name = name.title()
    parts[-1] = name
    return ': '.join(parts)
