<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def overlay_gateway_attach_rbridge_id(self, **kwargs):
 """Configure Overlay Gateway attach rbridge id Args: gw_name: Name of Overlay Gateway <WORD:1-32> rbridge_id: Single or range of rbridge id to be added/removed get (bool):
 Get config instead of editing config. (True, False) delete (bool):
 True, delete the attached rbridge list (True, False) callback (function):
 A function executed upon completion of the method. The only parameter passed to `callback` will be the ``ElementTree`` `config`. Returns: Return value of `callback`. Raises: KeyError: if `gw_name`, 'rbridge_id' is not passed. ValueError: if `gw_name`, 'rbridge_id' is invalid. Examples: """


        callback = kwargs.pop('callback', self._callback)
        get_config = kwargs.pop('get', False)
        delete = kwargs.pop('delete', False)
        if not get_config:
            gw_name = kwargs.pop('gw_name')
            rbridge_id = kwargs.pop('rbridge_id')
            if delete is True:
                gw_args = dict(name=gw_name, rb_remove=rbridge_id)
                overlay_gw = getattr(self._tunnels, 'overlay_gateway_'
                                     'attach_rbridge_id_rb_remove')
                config = overlay_gw(**gw_args)
            else:
                gw_args = dict(name=gw_name, rb_add=rbridge_id)
                overlay_gw = getattr(self._tunnels, 'overlay_gateway_'
                                     'attach_rbridge_id_rb_add')
                config = overlay_gw(**gw_args)

        if get_config:
            overlay_gw = getattr(self._tunnels, 'overlay_gateway_'
                                 'attach_rbridge_id_rb_add')
            config = overlay_gw(name='', rb_add='')
            output = callback(config, handler='get_config')
            if output.data.find('.//{*}name') is not None:
                if output.data.find('.//{*}attach') is not None:
                    output.data.find('.//{*}name').text
                    rb_id = output.data.find('.//{*}rb-add').text
                    return rb_id
                else:
                    return None
            else:
                return None

        return callback(config)