def extract_only_one_op(ops: Set[Optional[Operator]]) -> Optional[Operator]:
    """
    Helper function that returns the op from src_ops() or dst_ops() call.
    Return None if there are no ops or if there's more than one op.
    """
    if ops is None or len(ops) != 1:
        return None
    return list(ops)[0]

    Helper function that returns the op from src_ops() or dst_ops() call.
    Return None if there are no ops or if there's more than one op.
    
python/aitemplate/compiler/transform/fuse_utils.py