code: def write_gds(outfile,
                cells=None,
                name='library',
                unit=1.0e-6,
                precision=1.0e-9):
      
      current_library.name = name
      current_library.unit = unit
      current_library.precision = precision
      current_library.write_gds(outfile, cells)
docs: Write the current GDSII library to a file.
  
      The dimensions actually written on the GDSII file will be the
      dimensions of the objects created times the ratio
      ``unit/precision``.  For example, if a circle with radius 1.5 is
      created and we set ``unit=1.0e-6`` (1 um) and ``precision=1.0e-9``
      (1 nm), the radius of the circle will be 1.5 um and the GDSII file
      will contain the dimension 1500 nm.
  
      Parameters
      ----------
      outfile : file or string
          The file (or path) where the GDSII stream will be written.  It
          must be opened for writing operations in binary format.
      cells : array-like
          The list of cells or cell names to be included in the library.
          If ``None``, all cells are used.
      name : string
          Name of the GDSII library.
      unit : number
          Unit size for the objects in the library (in *meters*).
      precision : number
          Precision for the dimensions of the objects in the library (in
          *meters*).