code: def _remove_padding_ref(
      start_pad_width, end_pad_width, data, lengths
  ):
      pad_width = start_pad_width + end_pad_width
      out_size = data.shape[0] - (
          start_pad_width + end_pad_width
      ) * len(lengths)
      out = np.ndarray((out_size,) + data.shape[1:])
      in_ptr = 0
      out_ptr = 0
      for length in lengths:
          out_length = length - pad_width
          out[out_ptr : (out_ptr + out_length)] = data[
              (in_ptr + start_pad_width) : (
                  in_ptr + length - end_pad_width
              )
          ]
          in_ptr += length
          out_ptr += out_length
      lengths_out = lengths - (start_pad_width + end_pad_width)
      return (out, lengths_out)
  
imports: from caffe2.python import core
  from functools import partial
  from hypothesis import given, settings
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import hypothesis.strategies
  import numpy
  import unittest
  from caffe2.python import workspace
label_desc: Use image node_id 3 for calling a global function with example usage: _remove_padding_ref(start_pad_width, end_pad_width, data, lengths) and returns: out,  lengths_out