input: Write a function to create and return a Kubernetes pod configuration that publishes a tweet every 5 minutes, using the provided template. The function should be able to take an optional parameter for the image path and insert that into the configuration. If no image path is provided, the function should throw an exception. The function should return the complete pod configuration as a dictionary.
  
  def create_tweet_pod(image_path: str = None) -> dict:
      if not image_path:
          raise ValueError("Image path is required")
      
      pod_config = {
          "apiVersion": "v1",
          "kind": "Pod",
          "metadata": {
              "name": "tweet-publisher"
          },
          "spec": {
              "containers": [
                  {
                      "name": "tweet-publisher",
                      "image": image_path,
                      "command": [
                          "sh",
                          "-c",
                          'crontab -lcrontab && while true; do python publish-tweet.py && crontab -l | { cat; echo "*/5 * * * * python publish-tweet.py"; } | crontab -; sleep 31622400; done'
                      ],
                      "volumeMounts": [
                          {
                              "mountPath": "/crontab/crontab",
                              "subPath": "crontab",
                              "name": "cronmount"
                          }
                      ]
                  }
              ],
              "volumes": [
                  {
                      "name": "cronmount",
                      "configMap": {
                          "name": "tweet-cron"
                      }
                  }
              ]
          }
      }
      
      return pod_config
  
  assert create_tweet_pod("public/tweet_publisher:latest")=={
      "apiVersion": "v1",
      "kind": "Pod",
      "metadata": {
          "name": "tweet-publisher"
      },
      "spec": {
          "containers": [
              {
                  "name": "tweet-publisher",
                  "image": "public/tweet_publisher:latest",
                  "command": [
                      "sh",
                      "-c",
                      'crontab -lcrontab && while true; do python publish-tweet.py && crontab -l | { cat; echo "*/5 * * * * python publish-tweet.py"; } | crontab -; sleep 31622400; done'
                  ],
                  "volumeMounts": [
                      {
                          "mountPath": "/crontab/crontab",
                          "subPath": "crontab",
                          "name": "cronmount"
                      }
                  ]
              }
          ],
          "volumes": [
              {
                  "name": "cronmount",
                  "configMap": {
                      "name": "tweet-cron"
                  }
              }
          ]
      }
  }
  assert create_tweet_pod() raises ValueError
output: 
  def create_tweet_pod(image_path: str = None) -> dict:
      if not image_path:
          raise ValueError("Image path is required")
      
      pod_config = {
          "apiVersion": "v1",
          "kind": "Pod",
          "metadata": {
              "name": "tweet-publisher"
          },
          "spec": {
              "containers": [
                  {
                      "name": "tweet-publisher",
                      "image": image_path,
                      "command": [
                          "sh",
                          "-c",
                          'crontab -lcrontab && while true; do python publish-tweet.py && crontab -l | { cat; echo "*/5 * * * * python publish-tweet.py"; } | crontab -; sleep 31622400; done'
                      ],
                      "volumeMounts": [
                          {
                              "mountPath": "/crontab/crontab",
                              "subPath": "crontab",
                              "name": "cronmount"
                          }
                      ]
                  }
              ],
              "volumes": [
                  {
                      "name": "cronmount",
                      "configMap": {
                          "name": "tweet-cron"
                      }
                  }
              ]
          }
      }
      
      return pod_config
  