code: def get_gpt4all_default_kwargs(
      max_new_tokens=256,
      temperature=0.1,
      repetition_penalty=1.0,
      top_k=40,
      top_p=0.7,
      n_jobs=None,
      verbose=False,
      max_seq_len=None,
      main_gpu=0,
  ):
      if n_jobs in [None, -1]:
          n_jobs = int(
              os.getenv("OMP_NUM_THREADS", str(os.cpu_count() // 2))
          )
      n_jobs = max(1, min(20, n_jobs))  # hurts beyond some point
      n_gpus = n_gpus_global
      max_seq_len_local = (
          max_seq_len if max_seq_len is not None else 2048
      )  # fake for auto mode
      default_kwargs = dict(
          context_erase=0.5,
          n_batch=1,
          max_tokens=max_seq_len_local - max_new_tokens,
          n_predict=max_new_tokens,
          repeat_last_n=64 if repetition_penalty != 1.0 else 0,
          repeat_penalty=repetition_penalty,
          temp=temperature,
          temperature=temperature,
          top_k=top_k,
          top_p=top_p,
          use_mlock=True,
          n_ctx=max_seq_len_local,
          n_threads=n_jobs,
          main_gpu=main_gpu,
          verbose=verbose,
      )
      if n_gpus != 0:
          default_kwargs.update(dict(n_gpu_layers=100, f16_kv=True))
      return default_kwargs
  
imports: import inspect
  import os
  from typing import Dict, Any, Optional, List, Iterator
  from langchain.callbacks.manager import CallbackManagerForLLMRun
  from langchain.schema.output import GenerationChunk
  from langchain.llms import gpt4all
  from pydantic.v1 import root_validator
  from utils import FakeTokenizer, url_alive, download_simple, clear_torch_cache, n_gpus_global
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
  from langchain.llms import LlamaCpp
label_desc: Use image node_id 3 for calling a global function with example usage: get_gpt4all_default_kwargs(max_new_tokens, temperature, repetition_penalty, top_k, top_p, n_jobs, verbose, max_seq_len, main_gpu) and returns: default_kwargs