input: Write a function to parse a JSON data structure and return the name, age, and occupation from the given JSON data. If the input is not a valid JSON string, return None.
  assert parse_json('{"name": "John", "age": 18, "occupation": "Software Engineer"}') == ('John', 18, 'Software Engineer')
  assert parse_json('{"name": "Jane", "age": 22, "occupation": "Data Scientist"}') == ('Jane', 22, 'Data Scientist')
  assert parse_json('not a json string') == None
  assert parse_json('{"name": "Bob", "age": 25}') == None
  assert parse_json('{}') == (None, None, None)
output: def parse_json(json_str):
      try:
          data = json.loads(json_str)
          name = data.get('name')
          age = data.get('age')
          occupation = data.get('occupation')
          if name is None or age is None or occupation is None:
              return None
          return (name, age, occupation)
      except json.JSONDecodeError:
          return None