parameters: ()
return_statement: return _local_backends
docstring: Instantiates all known local backends.
docstring_summary: Instantiates all known local backends.
docstring_tokens: Instantiates all known local backends .
function: def _get_local_backends():
    """Instantiates all known local backends."""
    global _local_backends
    if _local_backends is not None:
      return _local_backends
  
    _local_backends = collections.OrderedDict()
    for name, factory in _local_backend_factories.items():
      try:
        backend = factory()
      except RuntimeError:
        # If the backend isn't built into the binary, or if it has no devices, we
        # expect a RuntimeError.
        continue
      _local_backends[name] = backend
    return _local_backends
function_tokens: def _get_local_backends ( ) : global _local_backends if _local_backends is not None : return _local_backends _local_backends = collections . OrderedDict ( ) for name , factory in _local_backend_factories . items ( ) : try : backend = factory ( ) except RuntimeError : # If the backend isn't built into the binary, or if it has no devices, we # expect a RuntimeError. continue _local_backends [ name ] = backend return _local_backends