initials=data["user"]["initials"],
        )
[docs]@dataclass
class Team(Component):
    """Component class for a team."""
    id: int
    name: str
    members: List[Member]
[docs]    @classmethod
    def from_data(cls, data: Dict) -> "Team":
        members = [Member.from_data(member_data) for member_data in data["members"]]
        return cls(id=data["id"], name=data["name"], members=members)
[docs]@dataclass
class Space(Component):
    """Component class for a space."""
    id: int
    name: str
    private: bool
    enabled_features: Dict[str, Any]
[docs]    @classmethod
    def from_data(cls, data: Dict[str, Any]) -> "Space":
        space_data = data["spaces"][0]
        enabled_features = {
            feature: value
            for feature, value in space_data["features"].items()
            if value["enabled"]
        }
        return cls(
            id=space_data["id"],
            name=space_data["name"],
            private=space_data["private"],
            enabled_features=enabled_features,
        )
[docs]def parse_dict_through_component(
    data: dict, component: Type[Component], fault_tolerant: bool = False
) -> Dict:
    """Parse a dictionary by creating
    a component and then turning it back into a dictionary.
    This helps with two things
    1. Extract and format data from a dictionary according to schema
    2. Provide a central place to do this in a fault-tolerant way
    """
    try:
        return asdict(component.from_data(data))
    except Exception as e:
        if fault_tolerant: