import pathlib


def check_size(path_to_file: pathlib.Path) -> int:
    """Calculates the size of a file in bytes.

    Parameters
    ----------
    path_to_file: pathlib.Path
        The path to the file for which we want to calculate the size.

    Returns
    -------
    int
        The size of the file in bytes.

    """
    return path_to_file.stat().st_size