code: def _get_field_from_model(model, field):
      """
      Extract `field` from `model`.
  
      Parameters
      ----------
      model: gensim.models.fasttext.FastText
          model from which `field` is extracted
      field: str
          requested field name, fields are listed in the `_NEW_HEADER_FORMAT` list
      """
      if field == "bucket":
          return model.wv.bucket
      elif field == "dim":
          return model.vector_size
      elif field == "epoch":
          return model.epochs
      elif field == "loss":
          # `loss` => hs: 1, ns: 2, softmax: 3, ova-vs-all: 4
          # ns = negative sampling loss (default)
          # hs = hierarchical softmax loss
          # softmax =  softmax loss
          # one-vs-all = one vs all loss (supervised)
          if model.hs == 1:
              return 1
          elif model.hs == 0:
              return 2
          elif model.hs == 0 and model.negative == 0:
              return 1
      elif field == "maxn":
          return model.wv.max_n
      elif field == "minn":
          return model.wv.min_n
      elif field == "min_count":
          return model.min_count
      elif field == "model":
          # `model` => cbow:1, sg:2, sup:3
          # cbow = continous bag of words (default)
          # sg = skip-gram
          # sup = supervised
          return 2 if model.sg == 1 else 1
      elif field == "neg":
          return model.negative
      elif field == "t":
          return model.sample
      elif field == "word_ngrams":
          # This is skipped in gensim loading setting, using the default from FB C++ code
          return 1
      elif field == "ws":
          return model.window
      elif field == "lr_update_rate":
          # This is skipped in gensim loading setting, using the default from FB C++ code
          return 100
      else:
          msg = (
              'Extraction of header field "'
              + field
              + '" from Gensim FastText object not implemmented.'
          )
          raise NotImplementedError(msg)
  
imports: import collections
  import gzip
  import io
  import logging
  import struct
  import numpy
label_desc: Use image node_id 11 for calling a global function with example usage: _get_field_from_model(model, field) and returns: model, model, model, int, model, int, model, int, model, unknown, model, model, int, model, int