code: def test_custom_single_feature_factory(self):
      # Given
      # pylint:disable=unused-variable
      @CRFFeatureFactory.register("my_single_feature", override=True)
      class MySingleFeatureFactory(SingleFeatureFactory):
          def compute_feature(self, tokens, token_index):
              return "(%s)[my_feature]" % tokens[token_index].value
  
      # pylint:enable=unused-variable
  
      # When
      config = {
          "factory_name": "my_single_feature",
          "args": {},
          "offsets": [0, -1],
      }
      feature_factory = CRFFeatureFactory.from_config(config)
      features = feature_factory.build_features()
      feature_name = features[0].name
      feature_name_offset = features[1].name
      tokens = tokenize("hello world", "en")
      cache = [{TOKEN_NAME: token} for token in tokens]
      feature_value = features[0].compute(1, cache)
      feature_value_offset = features[1].compute(1, cache)
  
      # Then
      self.assertEqual("my_single_feature", feature_name)
      self.assertEqual("my_single_feature[-1]", feature_name_offset)
      self.assertEqual("(world)[my_feature]", feature_value)
      self.assertEqual("(hello)[my_feature]", feature_value_offset)
  
imports: from __future__ import unicode_literals
  import io
  from mock import MagicMock
  from snips_nlu.constants import LANGUAGE, LANGUAGE_EN, SNIPS_DATETIME, SNIPS_NUMBER, STEMS, GAZETTEERS, WORD_CLUSTERS
  from snips_nlu.dataset import Dataset
  from snips_nlu.entity_parser import BuiltinEntityParser, CustomEntityParser
  from snips_nlu.entity_parser.custom_entity_parser_usage import CustomEntityParserUsage
  from snips_nlu.exceptions import NotRegisteredError
  from snips_nlu.preprocessing import tokenize
  from snips_nlu.slot_filler.crf_utils import BEGINNING_PREFIX, INSIDE_PREFIX, LAST_PREFIX, TaggingScheme, UNIT_PREFIX
  from snips_nlu.slot_filler.feature import Feature, TOKEN_NAME
  from snips_nlu.slot_filler.feature_factory import BuiltinEntityMatchFactory, CustomEntityMatchFactory, IsDigitFactory, IsFirstFactory, IsLastFactory, LengthFactory, NgramFactory, PrefixFactory, ShapeNgramFactory, SingleFeatureFactory, SuffixFactory, WordClusterFactory, CRFFeatureFactory
  from snips_nlu.tests.utils import SnipsTest
label_desc: Use image node_id 19 for calling the TestCRFFeatures obj's underlying member method code with example usage: obj.test_custom_single_feature_factory() and returns: unknown