human
Complete this python program:
def _hv_switch(op, expected_function):
assistant
#Here is the Python code you requested.

    """Return the right test class for HStack or VStack.
    :Parameters:
    - `op`: HStack or VStack class.
    - `expected_function`: function from scipy for comparaison.
    """
    class XStackTester(_HVStackTester, ):
        op_class = op
        def expected_f(self, a, format=None, dtype=None):
            return expected_function(a, format, dtype)
    XStackTester.__name__ = (op.__name__ + 'Tester')
    if hasattr(XStackTester, '__qualname__'):
        XStackTester.__qualname__ = XStackTester.__name__
    return XStackTester