<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def range_type_name(self, slot: SlotDefinition, containing_class_name: ClassDefinitionName) -> str: """ Generate the type name for the slot """

        if slot.primary_key or slot.identifier:
            return self.python_name_for(containing_class_name) + camelcase(slot.name)

        if slot.range in self.schema.classes and not slot.inlined:
            class_key = self.key_name_for(cast(ClassDefinitionName, slot.range))
            if class_key:
                return class_key
        return self.python_name_for(slot.range)