code: def compile_emoticons(emoticons_list):
      
      emoticons_compiled = []
      for emoticons, image in emoticons_list:
          for emoticon in emoticons:
              context = {
                  'name': emoticon,
                  'image': os.path.join(EMOTICONS_DIRECTORY, image),
                  'code': binascii.hexlify(emoticon.encode('utf-8'))}
              emoticons_compiled.append(
                  (re.compile(re.escape(emoticon)),
                   EMOTICON_TEMPLATE.render(context).strip())
              )
      return emoticons_compiled
docs: Compile a new list of emoticon tuples.
      Each tuple contains a compiled regular expression
      of the emoticon, and the html version of the emoticon.