def lookup_casstype(casstype):
 if isinstance(casstype, (CassandraType, CassandraTypeType)):
  return casstype
 try:
  return parse_casstype_args(casstype)
 except (ValueError, AssertionError, IndexError) as e:
  raise ValueError(("Don't know how to parse type string %r: %s" % (casstype, e)))

def lookup_casstype ( casstype ) : if isinstance ( casstype , ( CassandraType , CassandraTypeType ) ) : return casstype try : return parse_casstype_args ( casstype ) except ( ValueError , AssertionError , IndexError ) as e : raise ValueError ( ( "Don't know how to parse type string %r: %s" % ( casstype , e ) ) )
given a cassandra type as a string .