<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def strftime(self, dtime, format):
 # pylint: disable=redefined-builtin """ Locale-aware strftime, with format short-cuts. """

        format = self.STRFTIME_FORMATS.get(format + "_FORMAT", format)
        if six.PY2 and isinstance(format, six.text_type):
            format = format.encode("utf8")
        timestring = dtime.strftime(format)
        if six.PY2:
            timestring = timestring.decode("utf8")
        return timestring