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