def METHOD_NAME():
    # lazy imports
    import grass.temporal as tgis
    # Get the options
    name = options["input"]
    type = options["type"]
    title = options["title"]
    aggr_type = options["aggr_type"]
    description = options["description"]
    semantic = options["semantictype"]
    update = flags["u"]
    map_update = flags["m"]
    # Make sure the temporal database exists
    tgis.init()
    dbif = tgis.SQLDatabaseInterfaceConnection()
    dbif.connect()
    stds = tgis.open_old_stds(name, type, dbif)
    update = False
    if aggr_type and type == "stvds":
        return ()
    if aggr_type and type != "stvds":
        stds.metadata.set_aggregation_type(aggregation_type=aggr_type)
        update = True
    if title:
        stds.metadata.set_title(title=title)
        update = True
        # Update only non-null entries
    if description:
        stds.metadata.set_description(description=description)
        update = True
    if semantic:
        stds.base.set_semantic_type(semantic_type=semantic)
        update = True
    if update:
        stds.update(dbif=dbif)
    if map_update:
        # Update the registered maps from the grass spatial database
        statement = ""
        # This dict stores the datasets that must be updated
        dataset_dict = {}
        count = 0
        maps = stds.get_registered_maps_as_objects(dbif=dbif)
        # We collect the delete and update statements
        for map in maps:
            count += 1
            if count % 10 == 0:
                grass.percent(count, len(maps), 1)
            map.select(dbif=dbif)
            # Check if the map is present in the grass spatial database
            # Update if present, delete if not present
            if map.map_exists():
                # Read new metadata from the spatial database
                map.load()
                statement += map.update(dbif=dbif, execute=False)
            else:
                # Delete the map from the temporal database
                # We need to update all effected space time datasets
                datasets = map.get_registered_stds(dbif)
                if datasets:
                    for dataset in datasets:
                        dataset_dict[dataset] = dataset
                # Collect the delete statements
                statement += map.delete(dbif=dbif, update=False, execute=False)
        # Execute the collected SQL statements
        dbif.execute_transaction(statement)
        # Update the effected space time datasets
        for id in dataset_dict:
            stds_new = stds.get_new_instance(id)
            stds_new.select(dbif=dbif)
            stds_new.update_from_registered_maps(dbif=dbif)
    if map_update or update:
        stds.update_from_registered_maps(dbif=dbif)
    stds.update_command_string(dbif=dbif)
    dbif.close()