parameters: (self, ref, namespace=None, title=None)
return_statement: return {
        'href': '#type-%s' % type_name,
        'text': title or ref,
        'name': ref
      }
docstring: Resolve $ref |ref| in namespace |namespace|, or globally if None. If it
      cannot be resolved, pretend like it is a link to a type.
docstring_summary: Resolve $ref |ref| in namespace |namespace|, or globally if None. If it
      cannot be resolved, pretend like it is a link to a type.
docstring_tokens: Resolve $ref |ref| in namespace |namespace| or globally if None . If it cannot be resolved pretend like it is a link to a type .
function: def SafeGetLink(self, ref, namespace=None, title=None):
      """Resolve $ref |ref| in namespace |namespace|, or globally if None. If it
      cannot be resolved, pretend like it is a link to a type.
      """
      ref_data = self.GetLink(ref, namespace=namespace, title=title)
      if ref_data is not None:
        return ref_data
      logging.error('$ref %s could not be resolved in namespace %s.' %
          (ref, namespace))
      type_name = ref.rsplit('.', 1)[-1]
      return {
        'href': '#type-%s' % type_name,
        'text': title or ref,
        'name': ref
      }
function_tokens: def SafeGetLink ( self , ref , namespace = None , title = None ) : ref_data = self . GetLink ( ref , namespace = namespace , title = title ) if ref_data is not None : return ref_data logging . error ( '$ref %s could not be resolved in namespace %s.' % ( ref , namespace ) ) type_name = ref . rsplit ( '.' , 1 ) [ - 1 ] return { 'href' : '#type-%s' % type_name , 'text' : title or ref , 'name' : ref }