<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def default(self) -> typing.Optional[Profile]: """The name of the default profile to use, or `None`."""

        found = self.database.execute(
            "SELECT name, data FROM profiles WHERE selected"
            " ORDER BY name LIMIT 1").fetchone()
        if found is None:
            return None
        else:
            state = json.loads(found[1])
            state["name"] = found[0]  # Belt-n-braces.
            return Profile(**state)