code: def test_docstrings(backend):
      ivy.set_default_device("cpu")
      ivy.set_backend(backend)
      failures = []
      success = True
  
      for k, v in ivy.__dict__.copy().items():
          if k == "Array":
              for method_name in dir(v):
                  method = getattr(ivy.Array, method_name)
                  if hasattr(ivy.functional, method_name):
                      if helpers.gradient_incompatible_function(
                          fn=getattr(ivy.functional, method_name)
                      ) or check_docstring_examples_run(
                          fn=method, from_array=True
                      ):
                          continue
                  elif helpers.gradient_incompatible_function(
                      fn=method
                  ) or check_docstring_examples_run(
                      fn=method, from_array=True
                  ):
                      continue
                  failures.append(f"Array.{method_name}")
                  success = False
          elif k == "Container":
              for method_name in dir(v):
                  method = getattr(ivy.Container, method_name)
                  if hasattr(ivy.functional, method_name):
                      if helpers.gradient_incompatible_function(
                          fn=getattr(ivy.functional, method_name)
                      ) or check_docstring_examples_run(
                          fn=method, from_container=True
                      ):
                          continue
                  elif helpers.gradient_incompatible_function(
                      fn=method
                  ) or check_docstring_examples_run(
                      fn=method, from_container=True
                  ):
                      continue
                  failures.append(f"Container.{method_name}")
                  success = False
          else:
              if check_docstring_examples_run(
                  fn=v
              ) or helpers.gradient_incompatible_function(fn=v):
                  continue
              success = False
              failures.append(k)
      if not success:
          assert (
              success
          ), "\nThe following methods had failing docstrings:\n\n{}\n".format(
              "\n".join(failures)
          )
  
      ivy.previous_backend()
  
file_path: ivy/ivy_tests/test_docstrings.py
imports: import warnings
  import re
  from contextlib import redirect_stdout
  from io import StringIO
  import numpy
  import sys
  import pytest
  import ivy
  import ivy_tests.test_ivy.helpers
label_desc: Use image node_id 3 for calling a global function with example usage: test_docstrings(backend) without return types