code: def make_encoder(name):
      if name == "bow":
          return bow_encode
      elif name == "pe":
          return position_encode
      else:
          raise ValueError('Unknonw encoder type: "%s"' % name)
  
imports: import collections
  import json
  import os
  import numpy
  import six
  import chainer
  from chainer import backend
  import chainer.functions
  from chainer import initializers
  import chainer.links
  import babi
label_desc: Use image node_id 3 for calling a global function with example usage: make_encoder(name) and returns: bow_encode, position_encode