<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def loads(schema_str):
 """ Parse a schema given a schema string """

    try:
        if sys.version_info[0] < 3:
            return schema.parse(schema_str)
        else:
            return schema.Parse(schema_str)
    except schema.SchemaParseException as e:
        raise ClientError("Schema parse failed: %s" % (str(e)))