class_docstr: A plugin definition.
  
  Args:
      directory: the directory containing the plugin
      metadata: a plugin metadata dict
class_docstr_tok: ["A","plugin","definition",".","Args",":","directory",":","the","directory","containing","the","plugin","metadata",":","a","plugin","metadata","dict"]
docstr: Creates a :class:`PluginDefinition` for the given metadata file.
  
  Args:
      metadata_path: the path to a plugin ``.yaml`` file
  
  Returns:
      a :class:`PluginDefinition`
docstr_tok: ["Creates","a",":","class",":","`","PluginDefinition","`","for","the","given","metadata","file",".","Args",":","metadata_path",":","the","path","to","a","plugin","``",".yaml","``","file","Returns",":","a",":","class",":","`","PluginDefinition","`"]
code: def from_disk(cls, metadata_path):
      """Creates a :class:`PluginDefinition` for the given metadata file.
  
      Args:
          metadata_path: the path to a plugin ``.yaml`` file
  
      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)
  
imports: import os
  import yaml
  import eta.core.serial
  import fiftyone
label_desc: Use image node_id 25 for calling the PluginDefinition obj's underlying member method code with example usage: obj.from_disk(cls, metadata_path) and returns: cls