code: def _flatten_frontend_return(*, ret, backend):
      """Flattening the returned frontend value to a list of numpy arrays."""
      with BackendHandler.update_backend(backend) as ivy_backend:
          if not isinstance(ret, tuple):
              if not ivy_backend.is_ivy_array(ret):
                  ret_np_flat = helpers.flatten_frontend_to_np(
                      backend=backend, ret=ret
                  )
              else:
                  ret_np_flat = _flatten_fw_return(
                      ret=ret, backend=backend
                  )
          else:
              if any(not ivy_backend.is_ivy_array(x) for x in ret):
                  ret_np_flat = helpers.flatten_frontend_to_np(
                      backend=backend, ret=ret
                  )
              else:
                  ret_np_flat = _flatten_fw_return(
                      ret=ret, backend=backend
                  )
          return ret_np_flat
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_numpy/helpers.py
imports: import numpy
  from hypothesis import strategies
  import ivy
  import ivy_tests.test_ivy.helpers
  import ivy.functional.frontends.numpy
  from ivy_tests.test_ivy.helpers.pipeline_helper import BackendHandler, get_frontend_config
  import ivy_tests.test_ivy.helpers.globals
label_desc: Use image node_id 2 for calling a global function with example usage: _flatten_frontend_return() and returns: ret_np_flat