def class_factory(name, uid, BaseClass):
    """
    Generates a SOP Class subclass of `BaseClass` called `name`
    
    Parameters
    ----------
    name : str
        The name of the SOP class
    uid : str
        The UID of the SOP class
    BaseClass : pynetdicom.SOPclass.ServiceClass subclass
        One of the following Service classes:
            VerificationServiceClass
            StorageServiceClass
            QueryRetrieveFindServiceClass
            QueryRetrieveGetServiceClass
            QueryRetrieveMoveServiceClass
            
    Returns
    -------
    subclass of BaseClass
        The new class
    """
    def __init__(self):
        BaseClass.__init__(self)
        
    new_class = type(name, (BaseClass,), {"__init__": __init__})
    new_class.UID = uid
    
    return new_class