input: Write a python function to fetch data from OMDB API and Football Data API, merge the data based on year, and write it into a JSON file.
  assert fetch_and_merge_data('12345678', '87654321') == 'merged_data.json'
  assert 'Inception' in open('merged_data.json').read()
  assert 'Premier League' in open('merged_data.json').read()
output: import requests
  import json
  
  def fetch_and_merge_data(omdb_api_key, football_api_key):
      # Fetch data from OMDB API
      omdb_response = requests.get(f"http://www.omdbapi.com/?t=Inception&apikey={omdb_api_key}")
      omdb_data = omdb_response.json()
      omdb_year = omdb_data.get('Year', None)
  
      # Fetch data from Football Data API
      football_response = requests.get(f"https://api.football-data.org/v2/competitions?season={omdb_year}", headers={"X-Auth-Token": football_api_key})
      football_data = football_response.json()
  
      # Merge data based on year
      merged_data = {
          "omdb": omdb_data,
          "football": football_data
      }
  
      # Write to JSON file
      with open('merged_data.json', 'w') as json_file:
          json.dump(merged_data, json_file, indent=4)
      
      return 'merged_data.json'