input: Write a function to generate an API response in Python for the provided data. If the data is empty, return an error response with status 400 and message "Invalid data". The function should return a dictionary with the status, data, and message.
  
  assert generate_api_response({"name": "John", "age": 28}) == {"status": 200, "data": {"name": "John", "age": 28}, "message": "Success"}
  assert generate_api_response({}) == {"status": 400, "data": {}, "message": "Invalid data"}
output: def generate_api_response(data):
      if not data:
          return {"status": 400, "data": {}, "message": "Invalid data"}
      return {"status": 200, "data": data, "message": "Success"}