def timedelta_constructor(loader: Loader, node: Node) -> Optional[timedelta]: value = loader.construct_scalar(node) data = parse_timedelta(value) return data
def time_constructor(loader: Loader, node: Node) -> time: value = loader.construct_scalar(node) data = time.fromisoformat(value) return data