class_docstr: Abstract base class for QA Datasets with common utility methods 
class_docstr_tok: ["Abstract","base","class","for","QA","Datasets","with","common","utility","methods"]
docstr: Check if there is sufficient memory to prevent system from being unresponsive
  Otherwise system can become unresponsive as memory is slowly filled up, possibly leading to system unable to kill process
  Interrupts run if CPU memory use is more than 75%, to leave some capacity for model loading
docstr_tok: ["Check","if","there","is","sufficient","memory","to","prevent","system","from","being","unresponsive","Otherwise","system","can","become","unresponsive","as","memory","is","slowly","filled","up",",","possibly","leading","to","system","unable","to","kill","process","Interrupts","run","if","CPU","memory","use","is","more","than","75","%",",","to","leave","some","capacity","for","model","loading"]
code: def check_if_sufficient_memory():
      """
      Check if there is sufficient memory to prevent system from being unresponsive
      Otherwise system can become unresponsive as memory is slowly filled up, possibly leading to system unable to kill process
      Interrupts run if CPU memory use is more than 75%, to leave some capacity for model loading
      """
  
      percent_memory = psutil.virtual_memory().percent
      if percent_memory > 75:
          raise ValueError(
              "Please use a device with more CPU ram or a smaller dataset"
          )
  
imports: import collections
  import pickle
  from functools import lru_cache
  from typing import List
  import psutil
  import torch
  from nemo.collections.nlp.data.data_utils import is_whitespace
  from nemo.collections.nlp.data.question_answering.data_processor.qa_processing import EVALUATION_MODE, INFERENCE_MODE, TRAINING_MODE
  from nemo.core.classes import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 6 for calling the QADataset obj's underlying member method code with example usage: obj.check_if_sufficient_memory() without return types