Gets the metadata for shuffling items.

        return: (osid.Metadata) - metadata for the shuffled flag
        *compliance: mandatory -- This method must be implemented.*
342508
def get_items_shuffled_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['items_shuffled'])
        metadata.update({'existing_boolean_values': self._my_map['itemsShuffled']})
        return Metadata(**metadata)
292819
def get_distribute_verbatim_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['distribute_verbatim'])
        metadata.update({'existing_boolean_values': self._my_map['distributeVerbatim']})
        return Metadata(**metadata)
876749
def get_copyright_registration_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['copyright_registration'])
        metadata.update({'existing_string_values': self._my_map['copyrightRegistration']})
        return Metadata(**metadata)
476504
def shuffle(self):
        
        order = range(len(self))
        random.shuffle(order)
        for name, data in self.fields.items():
            reindexed = []
            for _, i in enumerate(order):
                reindexed.append(data[i])
            self.fields[name] = reindexed
        return self
1221709
def get_metadata(self):
        
        metadata_path = "{}/{}/{}".format(self.url,
                                          self.metadata_dir,
                                          self.metadata_file)
        metadata_sig_path = "{}/{}/{}.sig".format(self.url.rstrip('/'),
                                                  self.metadata_dir,
                                                  self.metadata_file)
        # load metadata
        req = requests.get(metadata_path)
        if req.status_code is 200:
            raw_metadata = req.content
        else:
            raise RepositoryError(metadata_path, ("status code not 200: "
                                                  "{}".format(req.status_code)))

        if self.gpg_verify:
            self.verify_data_signature(metadata_sig_path, metadata_path,
                                       raw_metadata)

        return self.parse_metadata(raw_metadata)
545110
def scramble_itemdata(self, oid, value):
        """"""
        if self.metadata is not None:
            path = ".//{0}[@{1}='{2}']".format(E_ODM.ITEM_DEF.value, A_ODM.OID.value, oid)
            elem = self.metadata.find(path)
            # for elem in self.metadata.iter(E_ODM.ITEM_DEF.value):
            datatype = elem.get(A_ODM.DATATYPE.value)

            codelist = None
            for el in elem.iter(E_ODM.CODELIST_REF.value):
                codelist = el.get(A_ODM.CODELIST_OID.value)

            length = 1 if not A_ODM.LENGTH in elem else int(elem.get(A_ODM.LENGTH.value))

            if A_ODM.SIGNIFICANT_DIGITS.value in elem.keys():
                sd = elem.get(A_ODM.SIGNIFICANT_DIGITS.value)
            else:
                sd = 0

            if A_ODM.DATETIME_FORMAT.value in elem.keys():
                dt_format = elem.get(A_ODM.DATETIME_FORMAT.value)
                for fmt in [('yyyy', '%Y'), ('MMM', '%b'), ('dd', '%d'), ('HH', '%H'), ('nn', '%M'), ('ss', '%S'),
                            ('-', '')]:
                    dt_format = dt_format.replace(fmt[0], fmt[1])

            if codelist is not None:
                return self.scramble_codelist(codelist)

            elif datatype == 'integer':
                return self.scramble_int(length)

            elif datatype == 'float':
                return self.scramble_float(length, sd)

            elif datatype in ['string', 'text']:
                return self.scramble_string(length)

            elif datatype in ['date', 'datetime']:
                return self.scramble_date(value, dt_format)

            elif datatype in ['time']:
                return self.scramble_time(dt_format)

            else:
                return self.scramble_value(value)

        else:
            return self.scramble_value(value)
454271
def get_avatar_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['avatar'])
        metadata.update({'existing_id_values': self._my_map['avatarId']})
        return Metadata(**metadata)
666969
def get_meta_value_for(snapshot, key, default=None):
    
    metadata = get_snapshot_metadata(snapshot)
    return metadata.get(key, default)
231260
def get_metadata(self):
        

        if self._metadata is None:
            self._metadata = self._source.get_metadata(self._handle)
        return self._metadata
858471
def get_grade_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['grade'])
        metadata.update({'existing_id_values': self._my_map['gradeId']})
        return Metadata(**metadata)
184705
def get_allow_repeat_items_metadata(self):
        """"""
        metadata = dict(self._allow_repeat_items_metadata)
        metadata.update({'existing_id_values': self.my_osid_object_form._my_map['allowRepeatItems']})
        return Metadata(**metadata)
1111997
def get_weight_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['weight'])
        metadata.update({'existing_cardinal_values': self._my_map['weight']})
        return Metadata(**metadata)
80515
def get_metadata(self, queue):
        
        uri = "/%s/%s/metadata" % (self.uri_base, utils.get_id(queue))
        resp, resp_body = self.api.method_get(uri)
        return resp_body
1358087
def are_items_shuffled(self):
        
        if self._my_map['itemsShuffled'] is None:
            return self.get_assessment().are_items_shuffled()
        return bool(self._my_map['itemsShuffled'])
1139826
def metadata(self):
        
        # Check exceptional case: return none if no metadata
        if not self._operation.HasField('metadata'):
            return None

        # Return expected metadata
        return _from_any(self._metadata_type, self._operation.metadata)
538073
def metadata(self):
        
        resp = self.r_session.get(self.server_url)
        resp.raise_for_status()
        return response_to_json_dict(resp)
871913
def get_metadata(self, key) -> str:
        
        return self.metadata[key] if key in self.metadata else None