code: def get(cls, name, definition, output_dir):
          
          if 'url' in definition:
              return URLResource(name, definition, output_dir)
          elif 'pypi' in definition:
              return PyPIResource(name, definition, output_dir)
          else:
              return Resource(name, definition, output_dir)
docs: Dispatch to the right subclass based on the definition.