human
What is a the Python program you requested given the following:
Complete the below
@pytest.mark.skipif(u'not    six.PY2')
def test_sharedmethod_imfunc():

    ''''Test that the im_func of a sharedmethod always points to the correct
    underlying function.
    This only applies to Python 2 as Python 3 does not have an im_func
    attribute on methods.'
    '''
assistant
#Here is the Python program you requested.
    def foo(self):
        pass
    actual_foo = foo
    class Bar(object, ):
        foo = sharedmethod(actual_foo)
    assert (Bar.foo.im_func is actual_foo)
    assert (Bar().foo.im_func is actual_foo)
    def foo(cls):
        pass
    actual_foo_2 = foo
    class MetaBar(type, ):
        foo = actual_foo_2
    class Bar(object, ):
        __metaclass__ = MetaBar
        foo = sharedmethod(actual_foo)
    assert (Bar.foo.im_func is actual_foo_2)
    assert (Bar().foo.im_func is actual_foo)
    class MetaBar(type, ):
        foo = None
    class Bar(object, ):
        __metaclass__ = MetaBar
        foo = sharedmethod(actual_foo)
    assert (Bar.foo.im_func is actual_foo)
    assert (Bar().foo.im_func is actual_foo)