@cell
def rotate(component: ComponentOrFactory, angle: float=90) -> Component:
    'Return rotated component inside a new component.\n\n    Most times you just need to place a reference and rotate it.\n    This rotate function just encapsulates the rotated reference into a new component.\n\n    Args:\n        component:\n        angle: in degrees\n    '
    component = (component() if callable(component) else component)
    component_new = Component()
    component_new.component = component
    ref = component_new.add_ref(component)
    ref.rotate(angle)
    component_new.add_ports(ref.ports)
    component_new.copy_child_info(component)
    return component_new
Return rotated component inside a new component.

Most times you just need to place a reference and rotate it.
This rotate function just encapsulates the rotated reference into a new component.

Args:
    component:
    angle: in degrees
@cell
def rotate(component: ComponentOrFactory, angle: float=90) -> Component:
    'Return rotated component inside a new component.\n\n    Most times you just need to place a reference and rotate it.\n    This rotate function just encapsulates the rotated reference into a new component.\n\n    Args:\n        component:\n        angle: in degrees\n    '
    component = (component() if callable(component) else component)
    component_new = Component()
    component_new.component = component
    ref = component_new.add_ref(component)
    ref.rotate(angle)
    component_new.add_ports(ref.ports)
    component_new.copy_child_info(component)
    return component_new