<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GET_namespace_names( self, path_info, namespace_id ):
 """ Get the list of names in a namespace Reply the list of names in a namespace Reply 404 if the namespace doesn't exist Reply 502 for any error in talking to the blockstack server """

        if not check_namespace(namespace_id):
            return self._reply_json({'error': 'Invalid namespace'}, status_code=400)

        qs_values = path_info['qs_values']
        page = qs_values.get('page', None)
        if page is None:
            log.error("Page required")
            return self._reply_json({'error': 'page= argument required'}, status_code=400)

        try:
            page = int(page)
            if page < 0:
                raise ValueError()

        except ValueError:
            log.error("Invalid page")
            return self._reply_json({'error': 'Invalid page= value'}, status_code=400)

        offset = page * 100
        count = 100

        blockstackd_url = get_blockstackd_url()
        namespace_names = blockstackd_client.get_names_in_namespace(namespace_id, offset=offset, count=count, hostport=blockstackd_url)
        if json_is_error(namespace_names):
            # error
            status_code = namespace_names.get('http_status', 502)
            return self._reply_json({'error': namespace_names['error']}, status_code=status_code)

        self._reply_json(namespace_names)
        return