docs: def add_sort_method(self, sort_method, label2_mask=None):
          '''A wrapper for `xbmcplugin.addSortMethod()
          <http://mirrors.xbmc.org/docs/python-docs/xbmcplugin.html#-addSortMethod>`_.
          You can use ``dir(xbmcswift2.SortMethod)`` to list all available sort
          methods.
  
          :param sort_method: A valid sort method. You can provided the constant
                              from xbmcplugin, an attribute of SortMethod, or a
                              string name. For instance, the following method
                              calls are all equivalent:
  
                              * ``plugin.add_sort_method(xbmcplugin.SORT_METHOD_TITLE)``
                              * ``plugin.add_sort_metohd(SortMethod.TITLE)``
                              * ``plugin.add_sort_method('title')``
          :param label2_mask: A mask pattern for label2. See the `XBMC
                              documentation
                              <http://mirrors.xbmc.org/docs/python-docs/xbmcplugin.html#-addSortMethod>`_
                              for more information.
          '''
          try:
              # Assume it's a string and we need to get the actual int value
              sort_method = SortMethod.from_string(sort_method)
          except AttributeError:
              # sort_method was already an int (or a bad value)
              pass
  
          if label2_mask:
              xbmcplugin.addSortMethod(self.handle, sort_method, label2_mask)
          else:
              xbmcplugin.addSortMethod(self.handle, sort_method)