input: Write a function to modify the given Python program to include a correct API request with headers and parse the response. If the response contains a list of users, print each user. If the response is empty or does not contain 'data', print an appropriate message.
  assert api_request('https://api.example.com/users')==[{'id': 1, 'name': 'Alice'}, {'id': 2, 'name': 'Bob'}]
  assert api_request('https://api.example.com/users_empty')==[]
  assert api_request('https://api.example.com/invalid_url')=='No data found'
  assert api_request('https://api.example.com/wrong_format')=='Invalid response format'
  assert api_request('https://api.example.com/error_status')=='Failed to get a valid response'
output: def api_request(url):
      import requests
      headers = {'Authorization': 'Bearer YOUR_TOKEN'}
      response = requests.get(url, headers=headers)
      
      if response.status_code != 200:
          return 'Failed to get a valid response'
      
      try:
          data = response.json()
      except ValueError:
          return 'Invalid response format'
      
      if 'data' not in data or not data['data']:
          return 'No data found'
      
      return data['data']