code: def _get_primals_and_tangents(
      x_, dtype, ivy_backend, primals_cont, tangents_cont
  ):
      if primals_cont:
          primals = ivy_backend.Container(
              {
                  "l": {
                      "a": ivy_backend.array(x_[0][0], dtype=dtype),
                      "b": ivy_backend.array(x_[0][1], dtype=dtype),
                  }
              }
          )
      else:
          primals = ivy_backend.array(x_[0], dtype=dtype)
  
      if tangents_cont:
          tangents = ivy_backend.Container(
              {
                  "l": {
                      "a": ivy_backend.array(
                          [t[0] for t in x_[1]], dtype=dtype
                      ),
                      "b": ivy_backend.array(
                          [t[0] for t in x_[1]], dtype=dtype
                      ),
                  }
              }
          )
      else:
          if primals_cont:
              tangents = ivy_backend.array(
                  [t[0] for t in x_[1]], dtype=dtype
              )
          else:
              tangents = ivy_backend.array(x_[1], dtype=dtype).T
      return primals, tangents
  
file_path: ivy/ivy_tests/test_ivy/test_functional/test_experimental/test_core/test_gradients.py
imports: import pytest
  import numpy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers.pipeline_helper import BackendHandler
label_desc: Use image node_id 1 for calling a global function with example usage: _get_primals_and_tangents(x_, dtype, ivy_backend, primals_cont, tangents_cont) and returns: primals,  tangents