code: def get_unused_code(self, min_confidence=0, sort_by_size=False):
          
          if not 0 <= min_confidence <= 100:
              raise ValueError('min_confidence must be between 0 and 100.')
  
          def by_name(item):
              return (item.filename.lower(), item.first_lineno)
  
          def by_size(item):
              return (item.size,) + by_name(item)
  
          unused_code = (self.unused_attrs + self.unused_classes +
                         self.unused_funcs + self.unused_imports +
                         self.unused_props + self.unused_vars +
                         self.unreachable_code)
  
          confidently_unused = [obj for obj in unused_code
                                if obj.confidence >= min_confidence]
  
          return sorted(confidently_unused,
                        key=by_size if sort_by_size else by_name)
docs: Return ordered list of unused Item objects.