def ball_and_socket_shape(self, connectors=None):
    assert self.canvas
    if (connectors is None):
        connected_items = [c.item for c in self.canvas.get_connections(connected=self)]
        connectors = any(map((lambda i: isinstance(i.subject, UML.Connector)), connected_items))
    return IconBox(Box(style={'min-width': self.min_width, 'min-height': self.min_height}, draw=self.draw_interface_ball_and_socket), Text(text=(lambda : UML.model.stereotypes_str(self.subject)), style={'min-width': 0, 'min-height': 0}), EditableText(text=(lambda : (self.subject.name or '')), style={'font-weight': (FontWeight.NORMAL if connectors else FontWeight.BOLD)}))
def ball_and_socket_shape(self, connectors=None):
    assert self.canvas
    if (connectors is None):
        connected_items = [c.item for c in self.canvas.get_connections(connected=self)]
        connectors = any(map((lambda i: isinstance(i.subject, UML.Connector)), connected_items))
    return IconBox(Box(style={'min-width': self.min_width, 'min-height': self.min_height}, draw=self.draw_interface_ball_and_socket), Text(text=(lambda : UML.model.stereotypes_str(self.subject)), style={'min-width': 0, 'min-height': 0}), EditableText(text=(lambda : (self.subject.name or )), style={'font-weight': (FontWeight.NORMAL if connectors else FontWeight.BOLD)}))