code: def get_keybindings(self, mode):
          
          globalmaps, modemaps = {}, {}
          bindings = self._bindings
          # get bindings for mode `mode`
          # retain empty assignations to silence corresponding global mappings
          if mode in bindings.sections:
              for key in bindings[mode].scalars:
                  value = bindings[mode][key]
                  if isinstance(value, list):
                      value = ','.join(value)
                  modemaps[key] = value
          # get global bindings
          # ignore the ones already mapped in mode bindings
          for key in bindings.scalars:
              if key not in modemaps:
                  value = bindings[key]
                  if isinstance(value, list):
                      value = ','.join(value)
                  if value and value != '':
                      globalmaps[key] = value
          # get rid of empty commands left in mode bindings
          for k, v in list(modemaps.items()):
              if not v:
                  del modemaps[k]
  
          return globalmaps, modemaps
docs: look up keybindings from `MODE-maps` sections
  
          :param mode: mode identifier
          :type mode: str
          :returns: dictionaries of key-cmd for global and specific mode
          :rtype: 2-tuple of dicts