You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: reverse.go
    path of file: ./repos/mgmt/engine/graph
    
    the code of the file until where you have to start completion: // Mgmt
// Copyright (C) 2013-2024+ James Shubin and the project contributors
// Written by James Shubin <james@shubin.ca> and the project contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public Licens
    
func (obj *State) ReversalCleanup() error {
	res, ok := obj.Vertex.(engine.ReversibleRes)
	if !ok {
		return nil // nothing to do
	}

	// Don't check res.ReversibleMeta().Disabled because we're removing the
	// previous one. That value only applies if we're doing a new reversal.

	if !res.ReversibleMeta().Reversal {
		return nil // nothing to erase, we're not a reversal resource
	}

	if !obj.isStateOK.Load() { // did we successfully reverse? (mutex RLock/RUnlock)
		obj.Logf("did not complete reversal") // warn
		return nil
	}

	// TODO: put this method on traits.Reversible as part of the interface?
	return obj.ReversalDelete() // Erase our reversal instructions.
}