code: def _tensor_splits(draw, add_axis=False):
      """Generates (axis, split_info, tensor_splits) tuples."""
      tensor = draw(
          hu.tensor(min_dim=2, min_value=4)
      )  # Each dim has at least 4 elements.
      axis = draw(
          st.integers(-len(tensor.shape), len(tensor.shape) - 1)
      )
      if add_axis:
          # Simple case: get individual slices along one axis, where each of them
          # is (N-1)-dimensional. The axis will be added back upon concatenation.
          return (
              axis,
              np.ones(tensor.shape[axis], dtype=np.int32),
              [
                  np.array(tensor.take(i, axis=axis))
                  for i in range(tensor.shape[axis])
              ],
          )
      else:
          # General case: pick some (possibly consecutive, even non-unique)
          # indices at which we will split the tensor, along the given axis.
          splits = sorted(
              draw(
                  st.lists(
                      elements=st.integers(0, tensor.shape[axis]),
                      max_size=4,
                  )
              )
              + [0, tensor.shape[axis]]
          )
          # Not support empty tensor
          splits = list(set(splits))
          return (
              axis,
              np.array(np.diff(splits), dtype=np.int32),
              [
                  tensor.take(
                      range(splits[i], splits[i + 1]), axis=axis
                  )
                  for i in range(len(splits) - 1)
              ],
          )
  
file_path: pytorch/caffe2/python/ideep/concat_split_op_test.py
imports: import numpy
  import hypothesis.strategies
  import unittest
  import caffe2.python.hypothesis_test_util
  from caffe2.python import core, workspace
  from hypothesis import given, settings
  import caffe2.python.ideep_test_util
label_desc: Use image node_id 1 for calling a global function with example usage: _tensor_splits(draw, add_axis) and returns: axis,  np,  unknown, axis,  np,  unknown