code: def _assert_same(values):
      
      assert len(values) > 0
      first, rest = values[0], values[1:]
      for v in rest:
          assert v == first
      return first
docs: Assert that all values are identical and return the unique value.