<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_listen(self, listen_node):
 """parse `listen` sections, and return a config.Listen Args: listen_node (TreeNode):
 Description Returns: config.Listen: an object """

        proxy_name = listen_node.listen_header.proxy_name.text
        service_address_node = listen_node.listen_header.service_address

        # parse the config block
        config_block_lines = self.__build_config_block(
            listen_node.config_block)

        # parse host and port
        host, port = '', ''
        if isinstance(service_address_node, pegnode.ServiceAddress):
            host = service_address_node.host.text
            port = service_address_node.port.text
        else:
            # use `bind` in config lines to fill in host and port
            # just use the first
            for line in config_block_lines:
                if isinstance(line, config.Bind):
                    host, port = line.host, line.port
                    break
            else:
                raise Exception(
                    'Not specify host and port in `listen` definition')
        return config.Listen(
            name=proxy_name, host=host, port=port,
            config_block=config_block_lines)