code: def construct_fixture_middleware(fixtures):
      
      def fixture_middleware(make_request, web3):
          def middleware(method, params):
              if method in fixtures:
                  result = fixtures[method]
                  return {'result': result}
              else:
                  return make_request(method, params)
          return middleware
      return fixture_middleware
docs: Constructs a middleware which returns a static response for any method
      which is found in the provided fixtures.