<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def warn(filepath, expected):
 """Raise warning. Parameters filepath : path-like Given filepath. expected : string Expected file suffix. """

        filepath = pathlib.Path(filepath)
        message = "file {0} has type {1} (expected {2})".format(
            filepath, filepath.suffix, expected
        )
        warnings.warn(message, WrongFileTypeWarning)