code: def new(self, mode):
      sock_type = self._mode_to_type[mode]
      if sock_type is None:
          return None
      return nnpy.Socket(nnpy.AF_SP, sock_type)
  
imports: import random
  import logging
  import multiprocessing
  import threading
  from fiber.backend import get_backend
label_desc: Use image node_id 2 for calling the NanomsgContext obj's underlying member method code with example usage: obj.new(mode) and returns: nnpy, None