input: Write a Python function to implement an LRU (Least Recently Used) cache with set and get methods.
  assert cache.get(1) == -1
  cache.set(1, 1)
  assert cache.get(1) == 1
  cache.set(2, 2)
  cache.set(3, 3)
  assert cache.get(2) == -1  # should evict key 2
  cache.set(4, 4)
  assert cache.get(1) == -1  # should evict key 1
  assert cache.get(3) == 3
  assert cache.get(4) == 4
output: class LRUCache:
      def __init__(self, capacity: int):
          self.cache = {}
          self.capacity = capacity
          self.order = []
  
      def get(self, key: int) -> int:
          if key in self.cache:
              self.order.remove(key)
              self.order.append(key)
              return self.cache[key]
          else:
              return -1
  
      def set(self, key: int, value: int) -> None:
          if key in self.cache:
              self.cache[key] = value
              self.order.remove(key)
              self.order.append(key)
          else:
              if len(self.cache) >= self.capacity:
                  lru = self.order.pop(0)
                  del self.cache[lru]
              self.cache[key] = value
              self.order.append(key)
  ```
  
  ```python
  # Testing the LRUCache implementation
  cache = LRUCache(2)
  assert cache.get(1) == -1
  cache.set(1, 1)
  assert cache.get(1) == 1
  cache.set(2, 2)
  cache.set(3, 3)
  assert cache.get(2) == -1  # should evict key 2
  cache.set(4, 4)
  assert cache.get(1) == -1  # should evict key 1
  assert cache.get(3) == 3
  assert cache.get(4) == 4