input: Write a function to generate a Python class to represent a 3-dimensional vector with an initial method to calculate its length. The class should have an initializer to set the vector's components and a method to calculate the vector's length using the formula for Euclidean distance.
  
  class Vector3D:
      def __init__(self, x, y, z):
          self.x = x
          self.y = y
          self.z = z
      
      def length(self):
          return (self.x**2 + self.y**2 + self.z**2)**0.5
  
  assert Vector3D(1, 2, 2).length() == 3.0
  assert Vector3D(0, 0, 0).length() == 0.0
  assert Vector3D(2, 3, 6).length() == 7.0
  assert Vector3D(5, 12, 0).length() == 13.0
  assert Vector3D(8, 15, 17).length() == 23.0
output: class Vector3D:
      def __init__(self, x, y, z):
          self.x = x
          self.y = y
          self.z = z
      
      def length(self):
          return (self.x**2 + self.y**2 + self.z**2)**0.5