docs: def category(self):
          """
          Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
          or file.
          """
  
          if self.id in ('reg', 'mem'):
              return self.id
  
          elif self._abstract_backer:
              return 'mem'
  
          elif self.id.startswith('file'):
              return 'file'
  
          else:
              raise SimMemoryError('Unknown SimMemory category for memory_id "%s"' % self.id)