def METHOD_NAME(path, se_type):
    """
    Set the SELinux type for the specified path to the specified value.
    + path: the target path (expression) for the context
    + se_type: the SELinux type for the given target
    **Example:**
    .. code:: python
        selinux.file_context(
            name='Allow /foo/bar to be served by the web server',
            '/foo/bar',
            'httpd_sys_content_t'
        )
    """
    current = host.get_fact(FileContext, path=path) or {}
    if se_type != current.get("type", ""):
        yield StringCommand("chcon", "-t", se_type, QuoteString(path))
        host.create_fact(
            FileContext,
            kwargs={"path": path},
            data=dict(current, **{"type": se_type}),
        )
    else:
        host.noop(f"file_context: '{path}' already had type '{se_type}'")