'Find the ``zmq.Context`` from ``args`` and ``kwargs`` at call time.
First, if there is an keyword argument named ``context`` and it is a
``zmq.Context`` instance , we will take it.
Second, we check all the ``args``, take the first ``zmq.Context``
instance.
Finally, we will provide default Context -- ``zmq.Context.instance``
:return: a ``zmq.Context`` instance'

def _get_context(self, *args, **kwargs):

    if (self.context_name in kwargs):
        ctx = kwargs[self.context_name]
        if isinstance(ctx, zmq.Context):
            return ctx
    for arg in args:
        if isinstance(arg, zmq.Context):
            return arg
    return zmq.Context.instance()
