input: Write a function to edit the given Python program to make a correct API request and parse the response. Function should include proper authorization headers and iterate through the response data. Provide the edited Python program as output.
  assert api_request_and_parse("import requests\n\nurl = 'https://api.example.com/users'\n\nresponse = requests.get(url)\n\nprint(response.json())", "Bearer YOUR_API_TOKEN") == "import requests\n\nurl = 'https://api.example.com/users'\n\nheaders = {\n 'Authorization': 'Bearer YOUR_API_TOKEN',\n 'Content-Type': 'application/json',\n}\n\nresponse = requests.get(url, headers=headers).json()\n\nfor user in response['data']:\n print(user)"
  assert api_request_and_parse("import requests\n\nurl = 'https://api.example.com/products'\n\nresponse = requests.get(url)\n\nprint(response.json())", "Bearer ANOTHER_API_TOKEN") == "import requests\n\nurl = 'https://api.example.com/products'\n\nheaders = {\n 'Authorization': 'Bearer ANOTHER_API_TOKEN',\n 'Content-Type': 'application/json',\n}\n\nresponse = requests.get(url, headers=headers).json()\n\nfor product in response['data']:\n print(product)"
  assert api_request_and_parse("", "Bearer EMPTY_API_TOKEN") == ""
  assert api_request_and_parse("import requests\n\nurl = 'https://api.example.com/orders'\n\nresponse = requests.get(url)\n\nprint(response.json())", "") == "import requests\n\nurl = 'https://api.example.com/orders'\n\nheaders = {\n 'Authorization': 'Bearer ',\n 'Content-Type': 'application/json',\n}\n\nresponse = requests.get(url, headers=headers).json()\n\nfor order in response['data']:\n print(order)"
output: def api_request_and_parse(program, token):
      if not program:
          return program
      lines = program.split('\n')
      new_lines = []
      for line in lines:
          if "response = requests.get(url)" in line:
              new_lines.append(f"headers = {{\n 'Authorization': 'Bearer {token}',\n 'Content-Type': 'application/json',\n}}")
              new_lines.append("response = requests.get(url, headers=headers).json()")
          elif "print(response.json())" in line:
              new_lines.append("for item in response['data']:\n print(item)")
          else:
              new_lines.append(line)
      return '\n'.join(new_lines)