code: def test_explanation_hstack(random_seed):
      """Checks that `hstack` works as expected with two valid Explanation objects.
      And that it returns an Explanation object.
      """
      # generate 2 Explanation objects for stacking
      rs = np.random.RandomState(random_seed)
      base_vals = np.ones(20) * 0.123
      exp1 = shap.Explanation(
          values=rs.randn(20, 7),
          base_values=base_vals,
      )
      exp2 = shap.Explanation(
          values=rs.randn(20, 5),
          base_values=base_vals,
      )
      new_exp = exp1.hstack(exp2)
  
      assert isinstance(new_exp, shap.Explanation)
      assert new_exp.values.shape == (20, 12)
  
imports: import numpy
  import pytest
  import shap
label_desc: Use image node_id 1 for calling a global function with example usage: test_explanation_hstack(random_seed) without return types