<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert(self, element):
 """Convert an element to a chainlink"""

        if isinstance(element, self.base_link_type):
            return element
        for converter in self.converters:
            link = converter(element)
            if link is not NotImplemented:
                return link
        raise TypeError('%r cannot be converted to a chainlink' % element)