'Given a set of other CassandraTypes, create a new subtype of this type
using them as parameters. This is how composite types are constructed.
>>> MapType.apply_parameters([DateType, BooleanType])
<class \'cassandra.cqltypes.MapType(DateType, BooleanType)\'>
`subtypes` will be a sequence of CassandraTypes.  If provided, `names`
will be an equally long sequence of column names or Nones.'

@classmethod
def apply_parameters(cls, subtypes, names=None):

    if ((cls.num_subtypes != 'UNKNOWN') and (len(subtypes) != cls.num_subtypes)):
        raise ValueError(('%s    types    require    %d    subtypes    (%d    given)' % (cls.typename, cls.num_subtypes, len(subtypes))))
    newname = cls.cass_parameterized_type_with(subtypes)
    if (six.PY2 and isinstance(newname, unicode)):
        newname = newname.encode('utf-8')
    return type(newname, (cls,), {'subtypes': subtypes, 'cassname': cls.cassname, 'fieldnames': names})
