code: def from_header_str(cls, header):
          
          if not header:
              return cls()
  
          try:
              params = header.strip().split(HEADER_DELIMITER)
              header_dict = {}
              data = {}
  
              for param in params:
                  entry = param.split('=')
                  key = entry[0]
                  if key in (ROOT, PARENT, SAMPLE):
                      header_dict[key] = entry[1]
                  # Ignore any "Self=" trace ids injected from ALB.
                  elif key != SELF:
                      data[key] = entry[1]
  
              return cls(
                  root=header_dict.get(ROOT, None),
                  parent=header_dict.get(PARENT, None),
                  sampled=header_dict.get(SAMPLE, None),
                  data=data,
              )
  
          except Exception:
              log.warning("malformed tracing header %s, ignore.", header)
              return cls()
docs: Create a TraceHeader object from a tracing header string
          extracted from a http request headers.