<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def thrift_request_builder(service, thrift_module, hostport=None, thrift_class_name=None):
 """Provide TChannel compatibility with Thrift-generated modules. The service this creates is meant to be used with TChannel like so: .. code-block:: python from tchannel import TChannel, thrift_request_builder from some_other_service_thrift import some_other_service tchannel = TChannel('my-service') some_service = thrift_request_builder( service='some-other-service', thrift_module=some_other_service ) resp = tchannel.thrift( some_service.fetchPotatoes() ) .. deprecated:: 0.18.0 Please switch to :py:func:`tchannel.thrift.load`. .. warning:: This API is deprecated and will be removed in a future version. :param string service: Name of Thrift service to call. This is used internally for grouping and stats, but also to route requests over Hyperbahn. :param thrift_module: The top-level module of the Apache Thrift generated code for the service that will be called. :param string hostport: When calling the Thrift service directly, and not over Hyperbahn, this 'host:port' value should be provided. :param string thrift_class_name: When the Apache Thrift generated Iface class name does not match thrift_module, then this should be provided. """


    # start with a request maker instance
    maker = ThriftRequestMaker(
        service=service,
        thrift_module=thrift_module,
        hostport=hostport,
        thrift_class_name=thrift_class_name
    )

    # create methods that mirror thrift client
    # and each return ThriftRequest
    methods = _create_methods(thrift_module)

    # then attach to instane
    for name, method in methods.iteritems():
        method = types.MethodType(method, maker, ThriftRequestMaker)
        setattr(maker, name, method)

    return maker