input: Write a python function that orders an array of non-negative integers by the count of ones in their binary representation in ascending order. If two integers have the same count of ones, arrange them by their decimal value.
  assert sort_by_ones([1,5,2,3,4]) == [1, 2, 4, 3, 5]
  assert sort_by_ones([-2,-3,-4,-5,-6]) == [-4, -2, -6, -5, -3]
  assert sort_by_ones([1,0,2,3,4]) == [0, 1, 2, 4, 3]
  assert sort_by_ones([]) == []
  assert sort_by_ones([2,5,77,4,5,3,5,7,2,3,4]) == [2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77]
  assert sort_by_ones([3,6,44,12,32,5]) == [32, 3, 5, 6, 12, 44]
  assert sort_by_ones([2,4,8,16,32]) == [2, 4, 8, 16, 32]
  assert sort_by_ones([2,4,8,16,32]) == [2, 4, 8, 16, 32]
output: def sort_by_ones(arr):
      return sorted(arr, key=lambda x: (bin(x).count('1'), x))