def METHOD_NAME(self, selection):
    for sel in selection:
        # to avoid Attribute Error from pymxs wrapper
        if rt.classOf(sel) in rt.Camera.classes:
            rt.viewport.setCamera(sel)
            return
    raise RuntimeError("Active Camera not found")