def METHOD_NAME(parameters):
    if 'file' not in parameters:
        return [["error", "Parameter 'file' not given."]]
    dirname = os.path.dirname(parameters['file'])
    if not os.path.exists(dirname) and '{ev' not in dirname:
        path = Path(dirname)
        try:
            path.mkdir(mode=0o755, parents=True, exist_ok=True)
        except OSError:
            return [
                ["error", "Directory (%r) of parameter 'file' does not exist and could not be created." % dirname]]
        else:
            return [
                ["info", "Directory (%r) of parameter 'file' did not exist, but has now been created." % dirname]]