class_docstr: Use a string to initialize a ProfilerOptions.
  The string should be in the format: "key1=value1;key2=value;key3=value3".
  For example:
    "profile_path=model.profile"
    "batch_range=[50, 60]; profile_path=model.profile"
    "batch_range=[50, 60]; tracer_option=OpDetail; profile_path=model.profile"
  
  ProfilerOptions supports following key-value pair:
    batch_range      - a integer list, e.g. [100, 110].
    state            - a string, the optional values are 'CPU', 'GPU' or 'All'. 
    sorted_key       - a string, the optional values are 'calls', 'total',
                       'max', 'min' or 'ave.
    tracer_option    - a string, the optional values are 'Default', 'OpDetail',
                       'AllOpDetail'.
    profile_path     - a string, the path to save the serialized profile data,
                       which can be used to generate a timeline.
    exit_on_finished - a boolean.
code: def _parse_from_string(self, options_str):
      for kv in options_str.replace(" ", "").split(";"):
          key, value = kv.split("=")
          if key == "batch_range":
              value_list = (
                  value.replace("[", "").replace("]", "").split(",")
              )
              value_list = list(map(int, value_list))
              if (
                  len(value_list) >= 2
                  and value_list[0] >= 0
                  and value_list[1] > value_list[0]
              ):
                  self._options[key] = value_list
          elif key == "exit_on_finished":
              self._options[key] = value.lower() in (
                  "yes",
                  "true",
                  "t",
                  "1",
              )
          elif key in [
              "state",
              "sorted_key",
              "tracer_option",
              "profile_path",
          ]:
              self._options[key] = value
          elif key == "timer_only":
              self._options[key] = value
  
file_path: PaddleSeg/paddleseg/utils/train_profiler.py
imports: import sys
  import paddle.profiler
label_desc: Use image node_id 2 for calling the ProfilerOptions obj's underlying member method code with example usage: obj._parse_from_string(options_str) without return types