code: def test_feature_names_validation(self):
      X = np.random.random((10, 3))
      y = np.random.randint(2, size=(10,))
  
      dm1 = xgb.DMatrix(X, y, feature_names=("a", "b", "c"))
      dm2 = xgb.DMatrix(X, y)
  
      bst = xgb.train([], dm1)
      bst.predict(dm1)  # success
      with pytest.raises(ValueError):
          bst.predict(dm2)
      bst.predict(dm1)  # success
  
      bst = xgb.train([], dm2)
      bst.predict(dm2)
  
imports: import json
  import os
  import tempfile
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
  from xgboost.testing.updater import ResetStrategy
label_desc: Use image node_id 11 for calling the TestModels obj's underlying member method code with example usage: obj.test_feature_names_validation() without return types