def convert_user(data): """convert dictionary to User object.""" return convert_class(Object(data), User)
def convert_status(data): """convert dictionary to Status object.""" result = convert_class(Object(data), Status) result.user = convert_class(Object(result.user), User) return result