def METHOD_NAME(model_path):
  """Extracts a set of operators from a tflite model."""
  custom_op_found = False
  operators_and_activations = set()
  with open(model_path, 'rb') as f:
    data_bytes = bytearray(f.read())
  data = visualize.CreateDictFromFlatbuffer(data_bytes)
  for op_code in data["operator_codes"]:
    if op_code['custom_code'] is None:
      op_code["builtin_code"] = max(op_code["builtin_code"],
                                    op_code["deprecated_builtin_code"])
    else:
      custom_op_found = True
      operators_and_activations.add(
          visualize.NameListToString(op_code['custom_code']))
  for op_code in data["operator_codes"]:
    # Custom operator already added.
    if custom_op_found and visualize.BuiltinCodeToName(
        op_code['builtin_code']) == "CUSTOM":
      continue
    operators_and_activations.add(
        visualize.BuiltinCodeToName(op_code['builtin_code']))
  return operators_and_activations