def get_mv_impedance(grid):
    """
    Determine MV grid impedance (resistance and reactance separately)

    Parameters
    ----------
    grid : LVGridDing0

    Returns
    -------
    :any:`list`
        List containing resistance and reactance of MV grid
    """

    omega = 2 * math.pi * 50

    mv_grid = grid.grid_district.lv_load_area.mv_grid_district.mv_grid
    edges = mv_grid.find_path(grid._station, mv_grid._station, type='edges')
    r_mv_grid = sum([e[2]['branch'].type['R'] * e[2]['branch'].length / 1e3
                     for e in edges])
    x_mv_grid = sum([e[2]['branch'].type['L'] / 1e3 * omega * e[2][
        'branch'].length / 1e3 for e in edges])

    return [r_mv_grid, x_mv_grid]