Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def from_json(cls, json_page):
return Page(
width=float(json_page["width"]),
height=float(json_page["height"]),
tokens=[Token.from_json(t) for t in json_page.get("tokens", [])]
)