input: Write a python function to detect cycles in a linked list.
  assert detect_cycles(node1) == True  # where node1 is part of a list with a cycle
  assert detect_cycles(node2) == False  # where node2 is part of a list without a cycle
  assert detect_cycles(node3) == True  # where node3 is part of a different list with a cycle
output: def detect_cycles(head):
      slow = head
      fast = head
      
      while fast and fast.next:
          slow = slow.next
          fast = fast.next.next
          
          if slow == fast:
              return True
              
      return False