original_docstring: 
      opens a geometry from a vector file.
  
      fname : str
          full path of the output file name
      feature : int
          optional; order number of feature that should be returned;
          default is 0 for the first feature/object/geometry.
      format : str
          optional; format name. currently only shapefile is supported
      def __getitem__(key):
          return geoms[key]
  
      Returns
      -------
      OGRGeometry
          a geometry from the input file as indexed by the feature number
      
docstring: opens a geometry from a vector file.
  fname : str
  full path of the output file name
  feature : int
  optional; order number of feature that should be returned;
  default is 0 for the first feature/object/geometry.
  format : str
  optional; format name. currently only shapefile is supported
  def __getitem__(key):
  return geoms[key]
  
  Returns
  
  OGRGeometry
  a geometry from the input file as indexed by the feature number
docstring_tokens: opens a geometry from a vector file . fname : str full path of the output file name feature : int optional ; order number of feature that should be returned ; default is 0 for the first feature / object / geometry . format : str optional ; format name . currently only shapefile is supported def __getitem__ ( key ) : return geoms [ key ] Returns OGRGeometry a geometry from the input file as indexed by the feature number
code: def open_geometry(fname, feature=0, format='shapefile'):
      '''
      opens a geometry from a vector file.
  
      fname : str
          full path of the output file name
      feature : int
          optional; order number of feature that should be returned;
          default is 0 for the first feature/object/geometry.
      format : str
          optional; format name. currently only shapefile is supported
      def __getitem__(key):
          return geoms[key]
  
      Returns
      -------
      OGRGeometry
          a geometry from the input file as indexed by the feature number
      '''
  
      if format == 'shapefile':
          drivername = "ESRI Shapefile"
  
      driver = ogr.GetDriverByName(drivername)
      ds = driver.Open(fname, 0)
      feature = ds.GetLayer(0).GetFeature(feature)
      geom = feature.GetGeometryRef()
  
      out = geom.Clone()
      ds, feature, geom = None, None, None
      return out
code_tokens: def open_geometry ( fname , feature = 0 , format = 'shapefile' ) : if format == 'shapefile' : drivername = "ESRI Shapefile" driver = ogr . GetDriverByName ( drivername ) ds = driver . Open ( fname , 0 ) feature = ds . GetLayer ( 0 ) . GetFeature ( feature ) geom = feature . GetGeometryRef ( ) out = geom . Clone ( ) ds , feature , geom = None , None , None return out
short_docstring: opens a geometry from a vector file.
short_docstring_tokens: opens a geometry from a vector file .
comment: '''
      opens a geometry from a vector file.
  
      fname : str
          full path of the output file name
      feature : int
          optional; order number of feature that should be returned;
          default is 0 for the first feature/object/geometry.
      format : str
          optional; format name. currently only shapefile is supported
      def __getitem__(key):
          return geoms[key]
  
      Returns
      -------
      OGRGeometry
          a geometry from the input file as indexed by the feature number
      '''