async function loadHostedMetadata(url) {
  ui.status('Loading metadata from ' + url);
  try {
    const metadataJson = await fetch(url);
    const metadata = await metadataJson.json();
    ui.status('Done loading metadata.');
    return metadata;
  } catch (err) {
    console.error(err);
    ui.status('Loading metadata failed.');
  }
}
Load metadata file stored at a remote URL.

@return An object containing metadata as key-value pairs.