code: def build_unsupervised_model(data, kwargs):
      kwargs = default_kwargs(kwargs)
      with tempfile.NamedTemporaryFile(delete=False) as tmpf:
          for line in data:
              tmpf.write((line + "\n").encode("UTF-8"))
          tmpf.flush()
          model = train_unsupervised(input=tmpf.name, **kwargs)
      return model
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from fasttext import train_supervised
  from fasttext import train_unsupervised
  from fasttext import util
  import fasttext
  import os
  import subprocess
  import unittest
  import tempfile
  import random
  import sys
  import copy
  import numpy
  from fasttext.tests.test_configurations import get_supervised_models
label_desc: Use image node_id 6 for calling a global function with example usage: build_unsupervised_model(data, kwargs) and returns: model