code: def set_as_object(self, *args):
          
          if len(args) == 1:
              self.set_as_map(args[0])
          elif len(args) == 2:
              self.put(args[0], args[1])
docs: Sets a new value to map element specified by its index.
          When the index is not defined, it resets the entire map value.
          This method has double purpose because method overrides are not supported in JavaScript.
  
          :param args: objects to set