import yaml


def format_result(data):
    """
    Format a result from an API call for printing.
    """
    if data is None or data == []:
        return ""
    return yaml.safe_dump(data, default_flow_style=False)