input: Write a function to generate a Kubernetes pod YAML configuration that publishes a tweet every 5 minutes using a specified public image. The function should output the YAML content as a string. If no image path is provided, the function should return an empty string.
  assert generate_tweet_pod_yaml('<INSERT_PUBLIC_PULLABLE_IMAGE_PATH_HERE>')=='''apiVersion: v1
  kind: Pod
  metadata:
    name: tweet-publisher
  spec:
    containers:
      - name: tweet-publisher
        image: <INSERT_PUBLIC_PULLABLE_IMAGE_PATH_HERE>
        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"'''.strip()
  assert generate_tweet_pod_yaml(None)==''
  assert generate_tweet_pod_yaml('')==''
output: def generate_tweet_pod_yaml(image_path):
      if not image_path:
          return ''
      return 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"'''.strip()