code: def backend_check_accuracy(inferred_train, inferred_test, approx):
      train_pos = sum(inferred_train) / len(inferred_train)
      test_pos = sum(inferred_test) / len(inferred_test)
      assert (
          train_pos > test_pos
          or train_pos == pytest.approx(test_pos, abs=approx)
          or test_pos == 1
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import pytest
  import numpy
  import keras
  from art.attacks.inference.membership_inference.black_box import MembershipInferenceBlackBox
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.estimators.regression import ScikitlearnRegressor, RegressorMixin
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import ARTTestException
label_desc: Use image node_id 23 for calling a global function with example usage: backend_check_accuracy(inferred_train, inferred_test, approx) without return types