code: def memory_data():
      
      vm = psutil.virtual_memory()
      sw = psutil.swap_memory()
  
      return {
          'virtual': {
              'total': mark(vm.total, 'bytes'),
              'free': mark(vm.free, 'bytes'),
              'percent': mark(vm.percent, 'percentage')
          },
          'swap': {
              'total': mark(sw.total, 'bytes'),
              'free': mark(sw.free, 'bytes'),
              'percent': mark(sw.percent, 'percentage')
          },
      }
docs: Returns memory data.