input: Write a python function to convert a timestamp to a formatted date string.
  assert timestamp_to_date(1638316800) == '2021-12-01 00:00:00'
  assert timestamp_to_date(1609459200) == '2021-01-01 00:00:00'
  assert timestamp_to_date(1672531200) == '2023-01-01 00:00:00'
output: def timestamp_to_date(timestamp):
      from datetime import datetime
      return datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')