code: def test_htmlsafe_repr_escapes_html(self):
      class MyFactor(CustomFactor):
          inputs = [TestingDataSet.float_col]
          window_length = 3
  
          def __repr__(self):
              return "<b>foo</b>"
  
      self.assertEqual(
          repr_htmlsafe(MyFactor()),
          "<b>foo</b>".replace("<", "&lt;").replace(">", "&gt;"),
      )
  
imports: import itertools
  from operator import attrgetter
  import numpy
  import pandas
  import toolz
  from zipline.pipeline import Pipeline
  from zipline.pipeline.classifiers import Everything
  from zipline.pipeline.domain import US_EQUITIES
  from zipline.pipeline.factors import CustomFactor
  from zipline.pipeline.data import Column, DataSet
  from zipline.pipeline.data.testing import TestingDataSet
  from zipline.pipeline.hooks.testing import TestingHooks
  from zipline.pipeline.hooks.progress import ProgressHooks, repr_htmlsafe, TestingProgressPublisher
  from zipline.pipeline.term import AssetExists, ComputableTerm, LoadableTerm
  from zipline.testing import parameter_space
  from zipline.testing.fixtures import ZiplineTestCase, WithSeededRandomPipelineEngine
  from zipline.testing.predicates import assert_almost_equal, instance_of
label_desc: Use image node_id 2 for calling the TermReprTestCase obj's underlying member method code with example usage: obj.test_htmlsafe_repr_escapes_html() and returns: str