input: Write a python function to convert date strings from one format to another using the datetime module.
  assert format_date('2023-10-05', '%Y-%m-%d', '%d/%m/%Y') == '05/10/2023'
  assert format_date('05-10-2023', '%d-%m-%Y', '%m/%d/%Y') == '10/05/2023'
  assert format_date('2023/10/05', '%Y/%m/%d', '%d-%m-%Y') == '05-10-2023'
output: def format_date(date_str, input_format, output_format):
      from datetime import datetime
      date_obj = datetime.strptime(date_str, input_format)
      return date_obj.strftime(output_format)