code: def from_parameters(
          cls,
          a: float,
          b: float,
          c: float,
          alpha: float,
          beta: float,
          gamma: float,
          vesta: bool = False,
      ):
          
  
          angles_r = np.radians([alpha, beta, gamma])
          cos_alpha, cos_beta, cos_gamma = np.cos(angles_r)
          sin_alpha, sin_beta, sin_gamma = np.sin(angles_r)
  
          if vesta:
              c1 = c * cos_beta
              c2 = (c * (cos_alpha - (cos_beta * cos_gamma))) / sin_gamma
  
              vector_a = [float(a), 0.0, 0.0]
              vector_b = [b * cos_gamma, b * sin_gamma, 0]
              vector_c = [c1, c2, math.sqrt(c ** 2 - c1 ** 2 - c2 ** 2)]
  
          else:
              val = (cos_alpha * cos_beta - cos_gamma) / (sin_alpha * sin_beta)
              # Sometimes rounding errors result in values slightly > 1.
              val = abs_cap(val)
              gamma_star = np.arccos(val)
  
              vector_a = [a * sin_beta, 0.0, a * cos_beta]
              vector_b = [
                  -b * sin_alpha * np.cos(gamma_star),
                  b * sin_alpha * np.sin(gamma_star),
                  b * cos_alpha,
              ]
              vector_c = [0.0, 0.0, float(c)]
  
          return Lattice([vector_a, vector_b, vector_c])
docs: Create a Lattice using unit cell lengths and angles (in degrees).
  
          Args:
              a (float): *a* lattice parameter.
              b (float): *b* lattice parameter.
              c (float): *c* lattice parameter.
              alpha (float): *alpha* angle in degrees.
              beta (float): *beta* angle in degrees.
              gamma (float): *gamma* angle in degrees.
              vesta: True if you import Cartesian coordinates from VESTA.
  
          Returns:
              Lattice with the specified lattice parameters.