def METHOD_NAME(diagram, element_factory, cls_type, item):
    cls = element_factory.create(cls_type)
    oper = element_factory.create(UML.Operation)
    parse(oper, "- oper(inout param: str): str")
    cls.ownedOperation = oper
    cls_item = diagram.create(item, subject=cls)
    new_items = copy_clear_and_paste_link({cls_item}, diagram, element_factory)
    new_cls_item = new_items.pop()
    assert isinstance(new_cls_item, item)
    assert (
        format(new_cls_item.subject.ownedOperation[0])
        == "- oper(inout param: str): str"
    )