docstr: Checks if the required fields exist in given dictionary  and fills any remaining fields.
  
  Keyword Arguments: 
  model_data: The model data to check.
code: def check_for_required_info(model_data: dict):
      """Checks if the required fields exist in given dictionary  and fills any remaining fields.
  
      Keyword Arguments:
      model_data: The model data to check.
      """
  
      list_of_required_fields = [
          "name",
          "task",
          "language",
          "pythonCode",
          "model_zip_path",
      ]
  
      if model_data["task"] not in PushToHub.list_of_tasks:
          list_of_tasks_string_version = "\n".join(
              PushToHub.list_of_tasks
          )
          raise ValueError(
              f"""Invalid task, please pick one of the following tasks\n{list_of_tasks_string_version}"""
          )
  
      if model_data["model_zip_path"].endswith(".zip"):
          with zipfile.ZipFile(
              model_data["model_zip_path"]
          ) as modelfile:
              if "metadata/part-00000" not in modelfile.namelist():
                  raise ValueError(
                      "The Model is not a Spark Saved Model."
                  )
      else:
          if not os.path.exists(
              f"{model_data['model_zip_path']}/metadata/part-00000"
          ):
              raise ValueError("The Model is not a Spark Saved Model.")
  
file_path: spark-nlp/python/sparknlp/upload_to_hub.py
imports: import requests
  import json
  from typing import List
  import sparknlp
  import os
  import zipfile
label_desc: Use image node_id 3 for calling the PushToHub obj's underlying member method code with example usage: obj.check_for_required_info(model_data) without return types