def METHOD_NAME(self, **kwargs):
    window = kwargs['window']
    text_query = kwargs['text_query']
    video_metadata = kwargs['metadata']
    window = nested_tensor_from_videos_list([window])
    valid_indices = torch.arange(len(window.tensors))
    if self._device_name == 'gpu':
        valid_indices = valid_indices.cuda()
    outputs = self.model(window, valid_indices, [text_query])
    window_masks = self.postprocessor(
        outputs, [video_metadata],
        window.tensors.shape[-2:])[0]['pred_masks']
    return window_masks