input: Write a python function to check the temperature in New York using the OpenWeatherMap API and send an email if the temperature is below 10 degrees.
  assert check_temp() == None  # This function does not return a value, so the assertion checks if it runs without error
output: import requests
  import smtplib
  from email.mime.text import MIMEText
  from email.mime.multipart import MIMEMultipart
  
  def check_temp():
      api_key = 'YOUR_API_KEY'
      city = 'New York'
      url = f'http://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}&units=metric'
      
      response = requests.get(url)
      data = response.json()
      
      temp = data['main']['temp']
      
      if temp < 10:
          send_email(temp)
  
  def send_email(temp):
      sender_email = "your_email@example.com"
      receiver_email = "receiver_email@example.com"
      password = "your_email_password"
  
      subject = "Temperature Alert"
      body = f"The current temperature in New York is {temp}°C, which is below 10°C."
  
      msg = MIMEMultipart()
      msg['From'] = sender_email
      msg['To'] = receiver_email
      msg['Subject'] = subject
  
      msg.attach(MIMEText(body, 'plain'))
  
      server = smtplib.SMTP('smtp.gmail.com', 587)
      server.starttls()
      server.login(sender_email, password)
      text = msg.as_string()
      server.sendmail(sender_email, receiver_email, text)
      server.quit()