code: def gdaldem_mem_ds(ds, processing='hillshade', returnma=False, computeEdges=False):
      
      choices = ["hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "Roughness"]
      out = None
      scale=1.0
      if not get_ds_srs(ds).IsProjected():
          scale=111120
      if processing in choices:
          out = gdal.DEMProcessing('', ds, processing, format='MEM', computeEdges=computeEdges, scale=scale)
      else:
          print("Invalid processing choice")
          print(choices)
      #This should be a separate function
      if returnma:
          from pygeotools.lib import iolib
          out = iolib.ds_getma(out)
      return out
docs: Wrapper for gdaldem functions
  
      Uses gdaldem API, requires GDAL v2.1+