code: def from_str(cls, role: str):
      if role == "local":
          return LOCAL
      if role == "guest":
          return GUEST
      elif role == "host":
          return HOST
      elif role == "arbiter":
          return ARBITER
      else:
          raise ValueError(f"role {role} is not supported")
  
file_path: FATE/python/fate/components/core/essential/_role.py
imports: from typing import Any, Dict, Union
  import pydantic
label_desc: Use image node_id 9 for calling the Role obj's underlying member method code with example usage: obj.from_str(cls, role) and returns: LOCAL, GUEST, HOST, ARBITER