input: Write a function to parse a JSON data structure and return the name, age, and occupation from the given JSON data. If the JSON data is empty or if any of the required keys are missing, the function should raise a ValueError.
  
  def parse_json(data):
   if not data:
   raise ValueError("JSON data is empty")
   try:
   return data['name'], data['age'], data['occupation']
   except KeyError as e:
   raise ValueError(f"Missing key: {e}")
  
  data = """{"name": "John", "age": 18, "occupation": "Software Engineer"}"""
  parsed_data = parse_json(json.loads(data))
  assert parsed_data == ("John", 18, "Software Engineer")
  
  data = """{}"""
  try:
   parsed_data = parse_json(json.loads(data))
  except ValueError as e:
   assert str(e) == "JSON data is empty"
  
  data = """{"name": "John", "occupation": "Software Engineer"}"""
  try:
   parsed_data = parse_json(json.loads(data))
  except ValueError as e:
   assert str(e) == "Missing key: 'age'"
output: def parse_json(data):
      if not data:
          raise ValueError("JSON data is empty")
      try:
          return data['name'], data['age'], data['occupation']
      except KeyError as e:
          raise ValueError(f"Missing key: {e}")