def findPortMatch(self, output_ports, input_ports, x_trans=0, 
                      fixed_out_pos=None, fixed_in_pos=None,
                      allow_conversion=False, out_converters=None):

        reg = get_module_registry()
        result = (None, None)
        min_dis = None
        selected_convs = None
        for o_item in output_ports:
            if o_item.invalid:
                continue
            for i_item in input_ports:
                if i_item.invalid:
                    continue
                convs = []
                if reg.ports_can_connect(o_item.port, i_item.port,
                                         allow_conversion=True,
                                         out_converters=convs):
                    if fixed_out_pos is not None:
                        out_pos = fixed_out_pos
                    else:
                        out_pos = o_item.getPosition()
                    if fixed_in_pos is not None:
                        in_pos = fixed_in_pos
                    else:
                        in_pos = i_item.getPosition()
                    vector = (out_pos - in_pos)
                    dis = (vector.x()-x_trans)*(vector.x()-x_trans) + \
                        vector.y()*vector.y()
                    if result[0] is None or dis < min_dis:
                        min_dis = dis
                        result = (o_item, i_item)
                        selected_convs = convs
        if selected_convs and out_converters is not None:
            out_converters.extend(selected_convs)
        return result
Creates a new BaseHTTPRequestHandler sub-class.
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/pipeline_view.py/QPipelineScene.findPortMatch--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver.py/CreateRequestHandler