docstr: Create a bound socket pair using a random port.
docstr_tok: ["Create","a","bound","socket","pair","using","a","random","port","."]
code: def create_bound_pair(
      self, type1=zmq.PAIR, type2=zmq.PAIR, interface="tcp://127.0.0.1"
  ):
      """Create a bound socket pair using a random port."""
      s1 = self.context.socket(type1)
      s1.setsockopt(zmq.LINGER, 0)
      port = s1.bind_to_random_port(interface)
      s2 = self.context.socket(type2)
      s2.setsockopt(zmq.LINGER, 0)
      s2.connect("%s:%s" % (interface, port))
      self.sockets.extend([s1, s2])
      return s1, s2
  
imports: import sys
  import time
  from threading import Thread
  from unittest import TestCase
  from pytest import mark
  import zmq
  from zmq.utils import jsonapi
label_desc: Use image node_id 5 for calling the BaseZMQTestCase obj's underlying member method code with example usage: obj.create_bound_pair(type1, type2, interface) and returns: s1,  s2