code: def attach(self, container_id=None, sudo=False):
      '''attach to a container instance based on container_id
  
         Parameters
         ==========
         container_id: the container_id to delete
         sudo: whether to issue the command with sudo (or not)
               a container started with sudo will belong to the root user
               If started by a user, the user needs to control deleting it
  
         Returns
         =======
         return_code: the return code from the delete command. 0 indicates a
                      successful delete, 255 indicates not.
      '''
      sudo = self._get_sudo(sudo)
      container_id = self.get_container_id(container_id)
  
      # singularity oci delete
      cmd = self._init_command('attach')
  
      # 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, sudof attach(self, container_id=None, sudo=False):
      '''attach to a container instance based on container_id
  
         Parameters
         ==========
         container_id: the container_id to delete
         sudo: whether to issue the command with sudo (or not)
               a container started with sudo will belong to the root user
               If started by a user, the user needs to control deleting it
  
         Returns
         =======
         return_code: the return code from the delete command. 0 indicates a
                      successful delete, 255 indicates not.
      '''
      sudo = self._get_sudo(sudo)
      container_id = self.get_container_id(container_id)
  
      # singularity oci delete
      cmd = self._init_command('attach')
  
      # 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)
docs: attach to a container instance based on container_id
  
         Parameters
         ==========
         container_id: the container_id to delete
         sudo: whether to issue the command with sudo (or not)
               a container started with sudo will belong to the root user
               If started by a user, the user needs to control deleting it
  
         Returns
         =======
         return_code: the return code from the delete command. 0 indicates a
                      successful delete, 255 indicates not.