code: def _BOW_FEATURE_EXTRACTOR(sf, target=None):
      """
      Return an SFrame containing a bag of words representation of each column.
      """
      if isinstance(sf, dict):
          out = _tc.SArray([sf]).unpack("")
      elif isinstance(sf, _tc.SFrame):
          out = sf.__copy__()
      else:
          raise ValueError("Unrecognized input to feature extractor.")
      for f in _get_str_columns(out):
          if target != f:
              out[f] = _tc.text_analytics.count_words(out[f])
      return out
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sframe
  from turicreate.toolkits._model import CustomModel
  from turicreate.toolkits._model import PythonProxy
  from turicreate.toolkits._internal_utils import _toolkit_repr_print
  from turicreate.toolkits import text_analytics
label_desc: Use image node_id 1 for calling a global function with example usage: _BOW_FEATURE_EXTRACTOR(sf, target) and returns: out