'OutputPlugin constructor.
Note that OutputPlugin constructor may run with security checks enabled
(if they\'re enabled in the config). Therefore it\'s a bad idea to write
anything to AFF4 in the constructor.
Constructor should only be overriden if some non-self.state-stored
class members should be initialized.
Args:
source_urn: URN of the data source to process the results from.
output_base_urn: URN of the AFF4 volume where plugin will write output
data (if needed).
args: This plugin\'s arguments.
token: Security token.
state: A dict representing the plugin\'s state. If this
is passed, no initialization will be performed, only the state will
be applied.
Raises:
ValueError: when state argument is passed together with args or token
arguments.'

def __init__(self, source_urn=None, output_base_urn=None, args=None, token=None, state=None):

    if (state and (token or args)):
        raise ValueError("'state'    argument    can't    be    passed    together    with    'args'    or    'token'.")
    if (not state):
        self.state = rdf_protodict.AttributedDict()
        self.state.source_urn = source_urn
        self.state.output_base_urn = output_base_urn
        self.state.args = args
        self.state.token = token
        self.InitializeState()
    else:
        self.state = state
    self.args = self.state['args']
    self.token = self.state['token']
    self.lock = threading.RLock()
