text: import requests
  from fairshake_assessments.core import metric
  from fairshake_assessments.utils.jsonld_frame import jsonld_frame
  
  
  @metric({
    '@id': 145,
    'name': 'Landing Page',
    'description': 'A landing page exists and is accessible',
    'principle': 'Findable',
  })
  def metric_145_landing_page(doc):
    landingPages = set(
      node['access']['landingPage']
      for node in jsonld_frame(doc, {
        '@type': 'DatasetDistribution',
        'access': {
          'landingPage': {},
        }
      })['@graph']
      if node['access'] and node['access']['landingPage']
    )
    if landingPages:
      for landingPage in landingPages:
        if requests.get(landingPage).status_code < 400:
          yield {
            'value': 1,
            'comment': 'Landing page found {} and seems to be accessible'.format(landingPage)
          }
        else:
          yield {
            'value': 0.75,
            'comment': 'Landing page found {} but seems to report a problem'.format(landingPage)
          }
    else:
      yield {
        'value': 0,
        'comment': 'Could not identify any landing pages'
      }
  