input: Write a function to generate an API response in Python for the provided data. If the data is not provided, return the default response with empty data and status code 400. If the data is provided, return the response with the given data, status code 200, and a success 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 request"}
output: def generate_api_response(data=None):
      if data is None:
          return {"status": 400, "data": {}, "message": "Invalid request"}
      else:
          return {"status": 200, "data": data, "message": "Success"}