def get_display_name(field):
    """
    Get the name used to display a field in the external representation.
    
    Args:
        field (Field): The respective field.
    
    Returns:
        str: The display_name used for external representation.
    """
    name = getattr(field, 'di_display_name', field.name)
    # If field has the `display_name` attribute, but the attribute
    # is empty return `field.name` instead.
    return name if name else field.name