<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_file(cls, file_path: Path, w3: Web3) -> "Package": """ Returns a ``Package`` instantiated by a manifest located at the provided Path. ``file_path`` arg must be a ``pathlib.Path`` instance. A valid ``Web3`` instance is required to instantiate a ``Package``. """

        if isinstance(file_path, Path):
            raw_manifest = file_path.read_text()
            validate_raw_manifest_format(raw_manifest)
            manifest = json.loads(raw_manifest)
        else:
            raise TypeError(
                "The Package.from_file method expects a pathlib.Path instance."
                f"Got {type(file_path)} instead."
            )
        return cls(manifest, w3, file_path.as_uri())