<｜begin▁of▁sentence｜>### Instruction:
As a Hospitality Manager overseeing the operations of a luxury hotel, a challenge has arisen with the display of room numbers on the digital map used by guests. The current edge drawing method for the labels is causing the room numbers to appear at different angles, making them difficult to read. This impacts the guest experience and needs to be addressed.

To ensure that all room numbers are horizontally aligned on the map, you want to override the method in the custom edge drawer that inherits from AbstractCairoEdgeDrawer. This will involve finding a way to calculate the rotation angle for each edge label to ensure they are consistently aligned.

What steps can be taken to override the relevant method and calculate the rotation angle for the edge labels to achieve the goal of horizontal alignment for all room numbers on the digital map?
### Response:
from igraph.drawing.edge import AbstractCairoEdgeDrawer

class CustomEdgeDrawer(AbstractCairoEdgeDrawer):
    def get_label_rotation(self):
        # In this custom edge drawer, let's align labels horizontally
        return 0

# Assuming 'context' is a Cairo context, 'graph' is an igraph Graph object,
# and 'drawer' is an instance of the CustomEdgeDrawer
drawer = CustomEdgeDrawer(context, graph)
for edge in graph.es:
    angle = drawer.get_label_rotation()
    edge_label = edge['label'] if 'label' in edge.attributes() else None
    if edge_label:
        # Draw the edge label with the rotation
        drawer.draw_label(edge, edge_label, angle)
<|EOT|>
