code: def sort_key(self):
      if self.pins == 0:
          # Unpinned entries are sorted by score.
          return (0, self.score)
      else:
          # Pinned entries sort after unpinned ones. Beyond that, we don't
          # worry about their relative order.
          return (1,)
  
imports: from __future__ import absolute_import, division, print_function
  import attr
label_desc: Use image node_id 1 for calling the Entry obj's underlying member method code with example usage: obj.sort_key() and returns: int,  self, int