code: def get_platform_metadata(self, platform, build_annotations):
          
  
          # retrieve all the workspace data
          build_info = get_worker_build_info(self.workflow, platform)
          osbs = build_info.osbs
  
          kind = "configmap/"
          cmlen = len(kind)
          cm_key_tmp = build_annotations['metadata_fragment']
          cm_frag_key = build_annotations['metadata_fragment_key']
  
          if not cm_key_tmp or not cm_frag_key or cm_key_tmp[:cmlen] != kind:
              msg = "Bad ConfigMap annotations for platform {}".format(platform)
              self.log.warning(msg)
              raise BadConfigMapError(msg)
  
          # use the key to get the configmap data and then use the
          # fragment_key to get the build metadata inside the configmap data
          # save the worker_build metadata
          cm_key = cm_key_tmp[cmlen:]
          try:
              cm_data = osbs.get_config_map(cm_key)
          except Exception:
              self.log.error("Failed to get ConfigMap for platform %s",
                             platform)
              raise
  
          metadata = cm_data.get_data_by_key(cm_frag_key)
          defer_removal(self.workflow, cm_key, osbs)
          return metadata
docs: Return the metadata for the given platform.