input: 
  def gen_html_form():
      """ Generate a basic HTML form using JavaScript to submit a user's city and submit the details to the server.
      
      Example:
      gen_html_form()
      >>> <form id="myForm" onsubmit="submitForm(event)">
      >>>   City:<br>
      >>>   <input type="text" name="city"><br>
      >>>   <input type="submit">
      >>> </form>
      >>> 
      >>> <script>
      >>> function submitForm(event) {
      >>>   event.preventDefault();
      >>> 
      >>>   const form = document.getElementById('myForm');
      >>>   const city = form.querySelector('input[name="city"]').value;
      >>> 
      >>>   const data = { city: city };
      >>> 
      >>>   const options = {
      >>>     method: 'POST',
      >>>     body: JSON.stringify(data),
      >>>     headers: {
      >>>       'Content-Type': 'application/json'
      >>>     }
      >>>   };
      >>> 
      >>>   fetch('/my-api/submit-form', options)
      >>>     .then(response => response.json())
      >>>     .then(data => {
      >>>       console.log(data);
      >>>     });
      >>> }
      >>> </script>
      """
      
      return '''<form id="myForm" onsubmit="submitForm(event)">
    City:<br>
    <input type="text" name="city"><br>
    <input type="submit">
  </form>
  
  <script>
  function submitForm(event) {
    event.preventDefault();
  
    const form = document.getElementById('myForm');
    const city = form.querySelector('input[name="city"]').value;
  
    const data = { city: city };
  
    const options = {
      method: 'POST',
      body: JSON.stringify(data),
      headers: {
        'Content-Type': 'application/json'
      }
    };
  
    fetch('/my-api/submit-form', options)
      .then(response => response.json())
      .then(data => {
        console.log(data);
      });
  }
  </script>'''
  
output:     return '''<form id="myForm" onsubmit="submitForm(event)">
    City:<br>
    <input type="text" name="city"><br>
    <input type="submit">
  </form>
  
  <script>
  function submitForm(event) {
    event.preventDefault();
  
    const form = document.getElementById('myForm');
    const city = form.querySelector('input[name="city"]').value;
  
    const data = { city: city };
  
    const options = {
      method: 'POST',
      body: JSON.stringify(data),
      headers: {
        'Content-Type': 'application/json'
      }
    };
  
    fetch('/my-api/submit-form', options)
      .then(response => response.json())
      .then(data => {
        console.log(data);
      });
  }
  </script>'''