code: def test_tanh(self):
      X = np.ones((5, 5)).astype(np.float32) - 0.5
  
      workspace.FeedBlob("x", X)
      model = ModelHelper(name="test_model")
      brew.tanh(model, "x", "out_tanh")
      model.Validate()
      workspace.RunNetOnce(model.param_init_net)
      workspace.RunNetOnce(model.net)
  
      out = workspace.FetchBlob("out_tanh")
      self.assertAlmostEqual(out.mean(), np.tanh(0.5), places=5)
  
imports: from caffe2.python import brew, core, scope, workspace
  from caffe2.python.modeling.parameter_info import ParameterTags
  from caffe2.python.model_helper import ModelHelper
  from caffe2.python.cnn import CNNModelHelper
  import unittest
  import numpy
label_desc: Use image node_id 5 for calling the BrewTest obj's underlying member method code with example usage: obj.test_tanh() without return types