code: def test_log_loss_pandas_input(setup):
      # case when input is a pandas series and dataframe gh-5715
      y_tr = np.array(["ham", "spam", "spam", "ham"])
      y_pr = np.array([[0.2, 0.7], [0.6, 0.5], [0.4, 0.1], [0.7, 0.2]])
      types = [(MockDataFrame, MockDataFrame)]
      try:
          from pandas import Series, DataFrame
  
          types.append((Series, DataFrame))
      except ImportError:
          pass
      for TrueInputType, PredInputType in types:
          # y_pred dataframe, y_true series
          y_true, y_pred = TrueInputType(y_tr), PredInputType(y_pr)
          loss = log_loss(y_true, y_pred).fetch()
          assert_almost_equal(loss, 1.0383217, decimal=6)
  
imports: import numpy
  import pytest
  from sklearn import datasets, svm
  from sklearn.exceptions import UndefinedMetricWarning
  from sklearn.metrics import accuracy_score
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_almost_equal, assert_array_equal, assert_array_almost_equal
  from sklearn.utils._mocking import MockDataFrame
  from ....None import execute, fetch
  from ....None import tensor
  from ....lib.sparse import SparseNDArray
  from ..None import accuracy_score, log_loss
  from .._classification import _check_targets, multilabel_confusion_matrix, precision_recall_fscore_support, precision_score, recall_score, f1_score, fbeta_score
label_desc: Use image node_id 5 for calling a global function with example usage: test_log_loss_pandas_input(setup) without return types