input: Write a function to generate a Kubernetes pod setup that publishes a tweet every 5 minutes. If the function is called with valid parameters, it should return the YAML configuration for the pod and ConfigMap as described. If any parameter is missing or invalid, it should return an error message.
  
  def create_tweet_pod(image_path: str) -> str:
      if not image_path:
          return "Error: Image path is missing or invalid."
      
      pod_yaml = f"""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
  ---
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: tweet-cron
  data:
    crontab: "* * * * * python publish-tweet.py"
  """
      return pod_yaml
  
  assert create_tweet_pod("my-valid-image-path") == \
  """apiVersion: v1
  kind: Pod
  metadata:
    name: tweet-publisher
  spec:
    containers:
      - name: tweet-publisher
        image: my-valid-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
  ---
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: tweet-cron
  data:
    crontab: "* * * * * python publish-tweet.py"
  """
  assert create_tweet_pod("") == "Error: Image path is missing or invalid."
output: def create_tweet_pod(image_path: str) -> str:
      if not image_path:
          return "Error: Image path is missing or invalid."
      
      pod_yaml = f"""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
  ---
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: tweet-cron
  data:
    crontab: "* * * * * python publish-tweet.py"
  """
      return pod_yaml