You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: astar.rs
    path of file: ./repos/Fyrox/src/utils
    
    the code of the file until where you have to start completion: //! Contains classic A* (A-star) path finding algorithms.
//!
//! A* is one of fastest graph search algorithms, it is used to construct shortest
//! possible path from vertex to vertex. In vast majority of games it is used in pair
//! with navigation meshes (navmesh). Check navmesh module docs for more info.

#![warn(missing_docs)]

use crate::core::{
    algebra::Vector3,
    math::{self, PositionProvider},
    visitor::prelude::*,
};

use std::{
    cmp::Ordering,
    collections::BinaryHeap,
    fmt::{Display, Formatter},
    ops::{Deref, DerefMut},
};

/// Graph vertex that contains position in world and list of indices of neighbour
/// vertices.
#[derive(Clone, Debug, Visit, PartialEq)]
pub struct VertexData {
    /// Position in the world coordinates
    pub position: Vector3<f32>,
    /// A set of indices of neighbour vertices.
    pub 
    
    fn astar_island_benchmark() {
        let start_time = Instant::now();

        let size = 100;
        let mut path = Vec::new();
        let mut pathfinder = Graph::new();

        // Create vertices.
        let mut vertices = Vec::new();
        for y in 0..size {
            for x in 0..size {
                vertices.push(GraphVertex::new(Vector3::new(x as f32, y as f32, 0.0)));
            }
        }
        pathfinder.set_vertices(vertices);

        // Link vertices as grid.
        // seperates grids half way down the y-axis
        for y in 0..(size - 1) {
            for x in 0..(size - 1) {
                if x != ((size / 2) - 1) {
                    pathfinder.link_bidirect(y * size + x, y * size + x + 1);
                }
                pathfinder.link_bidirect(y * size + x, (y + 1) * size + x);
            }
        }

        let setup_complete_time = Instant::now();

        println!(
            "\nsetup in: {:?}",
            setup_complete_time.duration_since(start_time)
        );

        for _ in 0..1000 {
            // generates a random start point on the left half of the grid
            let sx = rand::thread_rng().gen_range(0..((size / 2) - 1));
            let sy = rand::thread_rng().gen_range(0..(size - 1));

            // generates a random end point on the right half of the grid
            let tx = rand::thread_rng().gen_range((size / 2)..(size - 1));
            let ty = rand::thread_rng().gen_range(0..(size - 1));

            let from = sy * size + sx;
            let to = ty * size + tx;

            let path_result = pathfinder.build_positional_path(from, to, &mut path);

            let is_result_expected = path_result.as_ref().is_ok_and(|k| k.eq(&PathKind::Partial))
                || path_result.is_err_and(|e| matches!(e, PathError::HitMaxSearchIterations(_)));

            assert!(is_result_expected);
            assert!(!path.is_empty());

            if path.len() > 1 {
                // partial path should be along the divide
                assert_eq!(path.first().unwrap().x as i32, ((size / 2) - 1) as i32);
                // start point should be start point
                assert_eq!(
                    *path.last().unwrap(),
                    pathfinder.vertex(from).unwrap().position
                );
            } else {
                let point = *path.first().unwrap();
                assert_eq!(point, pathfinder.vertex(to).unwrap().position);
                assert_eq!(point, pathfinder.vertex(from).unwrap().position);
            }

            for pair in path.chunks(2) {
                if pair.len() == 2 {
                    let a = pair[0];
                    let b = pair[1];

                    assert!(a.metric_distance(&b) <= 2.0f32.sqrt());
                }
            }
        }

        println!("paths found in: {:?}", setup_complete_time.elapsed());
        println!("Total time: {:?}\n", start_time.elapsed());
    }