input: Write a function to parse a JSON data structure and return the name, age, and occupation fields. If the input is an empty string or a string that does not represent a valid json structure then return None.
  import json
  
  def parse_json(data):
   if data == "":
   return None
   try:
   data = json.loads(data)
   return data['name'], data['age'], data['occupation']
   except (json.JSONDecodeError, KeyError):
   return None
  
  assert parse_json('{"name": "John", "age": 18, "occupation": "Software Engineer"}')==('John', 18, 'Software Engineer')
  assert parse_json('{"name": "Alice", "age": 25, "occupation": "Data Scientist"}')==('Alice', 25, 'Data Scientist')
  assert parse_json('{"name": "Bob", "age": 30, "occupation": "Teacher"}')==('Bob', 30, 'Teacher')
  assert parse_json('{"name": "Charlie"}')==None
  assert parse_json('')==None
output: def parse_json(data):
      if data == "":
          return None
      try:
          data = json.loads(data)
          return data['name'], data['age'], data['occupation']
      except (json.JSONDecodeError, KeyError):
          return None