def METHOD_NAME(self, workflow, parent_labels, current_scope, base_from_scratch=False):
    with open(Path(workflow.source.path) / "Dockerfile", 'wt') as df:
        df.write('FROM scratch\n')
        if current_scope:
            df.write('LABEL distribution-scope={}\n'.format(current_scope))
    workflow.build_dir.init_build_dirs(["x86_64"], workflow.source)
    if not base_from_scratch:
        (flexmock(workflow.imageutil)
            .should_receive('base_image_inspect')
            .and_return({INSPECT_CONFIG: {'Labels': parent_labels}}))
    else:
        flexmock(workflow.imageutil).should_receive('base_image_inspect').and_return({})
    dockerfile_images = DockerfileImages([])
    if base_from_scratch:
        dockerfile_images = DockerfileImages(['scratch'])
    workflow.data.dockerfile_images = dockerfile_images
    plugin = DistributionScopePlugin(workflow)
    plugin.log = logging.getLogger('plugin')
    return plugin