def METHOD_NAME(nsides, radius, rand_r, rand_phi, rand_seed, divs):
    if rand_r or rand_phi:
        random.seed(rand_seed)
    vertices = []
    dphi = (2*pi)/nsides
    prev_vertex = None
    first_vertex = None
    for i in range(nsides):
        phi = dphi * i
        # randomize radius if necessary
        if not rand_r:
            rr = radius
        else:
            rr = random.uniform(radius - rand_r, radius + rand_r)
        # randomize angle if necessary
        if rand_phi:
            phi = random.uniform(phi - rand_phi, phi + rand_phi)
        x = rr*cos(phi)
        y = rr*sin(phi)
        next_vertex = (x, y, 0)
        if prev_vertex is not None and divs > 1:
            prev_x, prev_y, prev_z = prev_vertex
            alphas = [float(i)/divs for i in range(1, divs)]
            mid_vertices = [((1-alpha)*prev_x + alpha*x, (1-alpha)*prev_y + alpha*y, 0) for alpha in alphas]
            vertices.extend(mid_vertices)
        vertices.append(next_vertex)
        prev_vertex = next_vertex
        if first_vertex is None:
            first_vertex = next_vertex
    if divs > 1 and first_vertex is not None and prev_vertex is not None:
        x, y, z = first_vertex
        prev_x, prev_y, prev_z = prev_vertex
        alphas = [float(i)/divs for i in range(1, divs)]
        mid_vertices = [((1-alpha)*prev_x + alpha*x, (1-alpha)*prev_y + alpha*y, 0) for alpha in alphas]
        vertices.extend(mid_vertices)
    return vertices