class_docstr: PaddleHub server
class_docstr_tok: ["PaddleHub","server"]
docstr: Search PaddleHub Resource
  
  Args:
      type(str) : Resource type
      name(str) : Resource name
      version(str) : Resource version
docstr_tok: ["Search","PaddleHub","Resource","Args",":","type","(","str",")",":","Resource","type","name","(","str",")",":","Resource","name","version","(","str",")",":","Resource","version"]
code: def search_resource(
      self,
      type: str,
      name: str,
      version: str = None,
      source: str = None,
      update: bool = False,
      branch: str = None,
  ) -> List[dict]:
      """
      Search PaddleHub Resource
  
      Args:
          type(str) : Resource type
          name(str) : Resource name
          version(str) : Resource version
      """
      sources = (
          self.sources.values()
          if not source
          else [self._generate_source(source)]
      )
      for source in sources:
          if isinstance(source, GitSource) and update:
              source.update()
  
          if isinstance(source, GitSource) and branch:
              source.checkout(branch)
  
          result = source.search_resource(
              name=name, type=type, version=version
          )
          if result:
              return result
      return []
  
imports: import json
  import os
  import requests
  import threading
  import time
  import yaml
  from collections import OrderedDict
  from typing import List
  import paddle
  import paddlehub
  import paddlehub.config
  from paddlehub.config import cache_config
  from paddlehub.server import ServerSource, GitSource
  from paddlehub.utils import utils
label_desc: Use image node_id 9 for calling the HubServer obj's underlying member method code with example usage: obj.search_resource(type, name, version, source, update, branch) and returns: list, result