<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def customtype(self):
 """If this variable is a user-derivedy type, return the CustomType instance that is its kind. """

        result = None
        if self.is_custom:
            #Look for the module that declares this variable's kind in its public list.
            self.dependency()
            if self._kind_module is not None:
                if self.kind.lower() in self._kind_module.types:
                    result = self._kind_module.types[self.kind.lower()]

        return result