code: def parse_srs(t_srs, src_ds_list=None):
      
      if t_srs is None and src_ds_list is None:
          print("Input t_srs and src_ds_list are both None")
      else:
          if t_srs is None:
              t_srs = 'first'
          if t_srs == 'first' and src_ds_list is not None:
              t_srs = geolib.get_ds_srs(src_ds_list[0])
          elif t_srs == 'last' and src_ds_list is not None:
              t_srs = geolib.get_ds_srs(src_ds_list[-1])
          #elif t_srs == 'source':
          #    t_srs = None 
          elif isinstance(t_srs, osr.SpatialReference): 
              pass
          elif isinstance(t_srs, gdal.Dataset):
              t_srs = geolib.get_ds_srs(t_srs)
          elif isinstance(t_srs, str) and os.path.exists(t_srs): 
              t_srs = geolib.get_ds_srs(gdal.Open(t_srs))
          elif isinstance(t_srs, str):
              temp = osr.SpatialReference()
              if 'EPSG' in t_srs.upper():
                  epsgcode = int(t_srs.split(':')[-1])
                  temp.ImportFromEPSG(epsgcode)
              elif 'proj' in t_srs:
                  temp.ImportFromProj4(t_srs)
              else:
                  #Assume the user knows what they are doing
                  temp.ImportFromWkt(t_srs)
              t_srs = temp
          else:
              t_srs = None
      return t_srs
docs: Parse arbitrary input t_srs
  
      Parameters
      ----------
      t_srs : str or gdal.Dataset or filename
          Arbitrary input t_srs 
      src_ds_list : list of gdal.Dataset objects, optional
          Needed if specifying 'first' or 'last'
  
      Returns
      -------
      t_srs : osr.SpatialReference() object
          Output spatial reference system