code: def is_dxlink(x):
      '''
      :param x: A potential DNAnexus link
  
      Returns whether *x* appears to be a DNAnexus link (is a dict with
      key ``"$dnanexus_link"``) with a referenced data object.
      '''
      if not isinstance(x, dict):
          return False
      if '$dnanexus_link' not in x:
          return False
      link = x['$dnanexus_link']
      if isinstance(link, basestring):
          return True
      elif isinstance(link, dict):
          return any(key in link for key in ('id', 'job'))
      return Falsf is_dxlink(x):
      '''
      :param x: A potential DNAnexus link
  
      Returns whether *x* appears to be a DNAnexus link (is a dict with
      key ``"$dnanexus_link"``) with a referenced data object.
      '''
      if not isinstance(x, dict):
          return False
      if '$dnanexus_link' not in x:
          return False
      link = x['$dnanexus_link']
      if isinstance(link, basestring):
          return True
      elif isinstance(link, dict):
          return any(key in link for key in ('id', 'job'))
      return False
docs: :param x: A potential DNAnexus link
  
      Returns whether *x* appears to be a DNAnexus link (is a dict with
      key ``"$dnanexus_link"``) with a referenced data object.