def format_shape_listing(data):
    """Returns a formated list of shapes.

    Args:
        data (list): A list of shape objects.

    Returns:
        The formated list as string
    """
    out = ""

    # return compartments in READABLE text output
    i = 1
    for s in data:
        # cSpell:ignore ocpus
        out += f"{i:>4} {s.shape:20} {s.ocpus:5.1f}x " \
            f"{s.processor_description[:22]:22} " \
            f"{s.memory_in_gbs:5.0f}GB Ram\n"
        i += 1

    return out