@staticmethod
def get_attributes(operation, **kwargs):
    """ Get the operation attributes. """
    if operation:
        command = operation.command
        input_obj = operation.input_obj
        context = operation.context
        params = operation.params
    else:
        command = kwargs.pop('command', None)
        input_obj = kwargs.pop('input_obj', None)
        context = kwargs.pop('context', None)
        params = kwargs.pop('params', kwargs)
    return command, input_obj, params, context
