code: def assert_is_valid_plot_return_object(objs):  # pragma: no cover
      import matplotlib.pyplot as plt
  
      if isinstance(objs, (pd.Series, np.ndarray)):
          for el in objs.ravel():
              msg = (
                  "one of 'objs' is not a matplotlib Axes instance, "
                  f"type encountered {type(el).__name__}"
              )
              assert isinstance(el, (plt.Axes, dict)), msg
      else:
          msg = (
              "objs is neither an ndarray of Artist instances nor a single "
              f"ArtistArtist instance, tuple, or dict, 'objs' is a {type(objs).__name__}"
          )
          assert isinstance(objs, (plt.Artist, tuple, dict)), msg
  
file_path: mars/mars/dataframe/plotting/tests/test_plot.py
imports: import warnings
  import tempfile
  import numpy
  import pandas
  import pytest
  from ....None import tensor
  from ....None import dataframe
label_desc: Use image node_id 2 for calling a global function with example usage: assert_is_valid_plot_return_object(objs) without return types