code: def _read_brainvision(fname, head_size):
      # 'BrainVision Electrodes File' format
      # Based on BrainVision Analyzer coordinate system: Defined between
      # standard electrode positions: X-axis from T7 to T8, Y-axis from Oz to
      # Fpz, Z-axis orthogonal from XY-plane through Cz, fit to a sphere if
      # idealized (when radius=1), specified in millimeters
      defusedxml = _soft_import(
          "defusedxml", "reading BrainVision montages"
      )
      root = defusedxml.ElementTree.parse(fname).getroot()
      ch_names = [s.text for s in root.findall("./Electrode/Name")]
      theta = [float(s.text) for s in root.findall("./Electrode/Theta")]
      pol = np.deg2rad(np.array(theta))
      phi = [float(s.text) for s in root.findall("./Electrode/Phi")]
      az = np.deg2rad(np.array(phi))
      rad = [float(s.text) for s in root.findall("./Electrode/Radius")]
      rad = np.array(rad)  # specified in mm
      pos = _sph_to_cart(np.array([rad, az, pol]).T)
  
      if head_size is not None:
          pos *= head_size / np.median(np.linalg.norm(pos, axis=1))
  
      return make_dig_montage(ch_pos=_check_dupes_odict(ch_names, pos))
  
imports: import csv
  import os.path
  from collections import OrderedDict
  from functools import partial
  import numpy
  from .._freesurfer import get_mni_fiducials
  from ..transforms import _sph_to_cart
  from ..utils import _pl, _soft_import, warn
  from .None import __file__
  from .montage import make_dig_montage
label_desc: Use image node_id 14 for calling a global function with example usage: _read_brainvision(fname, head_size) and returns: make_dig_montage