<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def implode(self, value, glue=''):
 """ Concatenate values of a given key as a string. :param value: The value :type value: str :param glue: The glue :type glue: str :rtype: str """

        first = self.first()

        if not isinstance(first, (basestring)):
            return glue.join(self.pluck(value).all())

        return value.join(self.items)