code: def get_as_map(self, key):
          
          if key == None:
              map = {}
              for (k, v) in self.items():
                  map[k] = v
              return map
          else:
              value = self.get(key)
              return MapConverter.to_map(value)
docs: Converts map element into an AnyValueMap or returns empty AnyValueMap if conversion is not possible.
  
          :param key: a key of element to get.
  
          :return: AnyValueMap value of the element or empty AnyValueMap if conversion is not supported.