code: def _test_lengths_op(self, inputs, ref_op_name, torch_op, device):
      data, lengths = inputs
  
      def _lengths_ref(X, Y):
          ref_op = core.CreateOperator(ref_op_name, ["X", "Y"], "out")
          workspace.FeedBlob("X", X)
          workspace.FeedBlob("Y", Y)
          workspace.RunOperatorOnce(ref_op)
          return workspace.FetchBlob("out")
  
      expected_output = _lengths_ref(data, lengths)
      actual_output = torch_op(
          torch.tensor(data), torch.tensor(lengths, dtype=torch.int32)
      )
  
      assert_allclose(expected_output, actual_output.cpu())
  
imports: import struct
  import unittest
  import caffe2.python.hypothesis_test_util
  import hypothesis.strategies
  import numpy
  import torch
  from caffe2.python import core, workspace
  from hypothesis import given, settings
  from scipy.stats import norm
  from ._utils import assert_allclose
label_desc: Use image node_id 17 for calling the TorchIntegration obj's underlying member method code with example usage: obj._test_lengths_op(inputs, ref_op_name, torch_op, device) and returns: workspace