def from_disk(cls, metadata_path, shadow_paths=None):
        """Creates a :class:`PluginDefinition` for the given metadata file.

        Args:
            metadata_path: the path to a plugin ``.yaml`` file
            shadow_paths (None): a list of plugin directories that this plugin
                shadows

        Returns:
            a :class:`PluginDefinition`
        """
        dirpath = os.path.dirname(metadata_path)
        with open(metadata_path, "r") as f:
            metadata = yaml.safe_load(f)

        return cls(dirpath, metadata, shadow_paths=shadow_paths)
Creates a :class:`PluginDefinition` for the given metadata file.

        Args:
            metadata_path: the path to a plugin ``.yaml`` file
            shadow_paths (None): a list of plugin directories that this plugin
                shadows

        Returns:
            a :class:`PluginDefinition`
        
fiftyone/plugins/definitions.py