code: def parallel_encoding_check(df, encoders):
      """
      Given a dataframe and some encoders, this rule-based method determines whether to train these encoders in parallel.
      This has runtime implications, as instancing a new Lightwood process has noticeable overhead.
      """  # noqa
      trainable_encoders = [
          enc
          for col, enc in encoders.items()
          if enc.is_trainable_encoder
      ]
  
      if len(trainable_encoders) > MAX_SEQ_ENCODERS:
          return True
  
      if len(df) > MAX_SEQ_LEN:
          return True
  
      return False
  
file_path: lightwood/lightwood/helpers/parallelism.py
imports: import os
  from typing import Dict
  import psutil
  import multiprocessing
  from lightwood.helpers.log import log
label_desc: Use image node_id 4 for calling a global function with example usage: parallel_encoding_check(df, encoders) and returns: False, True, True