<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def update(self, container_id, from_file=None):
    '''update container cgroup resources for a specific container_id,
       The container must have state "running" or "created."

       Singularity Example:
           singularity oci update [update options...] <container_ID>
           singularity oci update --from-file cgroups-update.json mycontainer

       Parameters
       ==========
       container_id: the container_id to update cgroups for
       from_file: a path to an OCI JSON resource file to update from.
    '''
    sudo = self._get_sudo(sudo)
    container_id = self.get_container_id(container_id)

    # singularity oci delete
    cmd = self._init_command('update')

    if from_file != None:
        cmd = cmd + ['--from-file', from_file]

    # Add the container_id
    cmd.append(container_id)

    # Delete the container, return code goes to user (message to screen)
    return self._run_and_return(cmd, sudo)