code: 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))
docs: Given a Cassandra type as a string (possibly including parameters), hand
      back the CassandraType class responsible for it. If a name is not
      recognized, a custom _UnrecognizedType subclass will be created for it.
  
      Example:
  
          >>> lookup_casstype('org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type)')
          <class 'cassandra.cqltypes.MapType(UTF8Type, Int32Type)'>