Return the slide identifier associated with *slide_part* in this
        presentation.
6891
def slide_id(self, slide_part):
        
        for sldId in self._element.sldIdLst:
            if self.related_parts[sldId.rId] is slide_part:
                return sldId.id
        raise ValueError('matching slide_part not found')
1195767
def get_id(self):
        """"""
        waypoint_index = 0
        if 'waypointIndex' in self.my_osid_object._my_map:
            waypoint_index = self.my_osid_object._my_map['waypointIndex']
        # NOTE that the order of the dict **must** match the order in generate_children()
        #   when creating the child_part_id
        #   1) level
        #   2) objective_ids
        #   3) parent_id
        #   4) waypoint_index
        magic_identifier = OrderedDict({
            'level': self._level,
            'objective_ids': self.my_osid_object._my_map['learningObjectiveIds'],
        })
        if self._magic_parent_id is not None:
            magic_identifier['parent_id'] = str(self._magic_parent_id)
        magic_identifier['waypoint_index'] = waypoint_index

        identifier = quote('{0}?{1}'.format(str(self.my_osid_object._my_map['_id']),
                                            json.dumps(magic_identifier)))
        return Id(namespace='assessment_authoring.AssessmentPart',
                  identifier=identifier,
                  authority=MAGIC_PART_AUTHORITY)
493665
def identifier_director(**kwargs):
    """"""
    qualifier = kwargs.get('qualifier', '')
    content = kwargs.get('content', '')
    if qualifier == 'ISBN':
        return CitationISBN(content=content)
    elif qualifier == 'ISSN':
        return CitationISSN(content=content)
    elif qualifier == 'DOI':
        return CitationDOI(content=content)
    elif qualifier == 'REP-NO':
        return CitationTechnicalReportNumber(content=content)
    else:
        return None
1168173
def add_slide(self, slide_layout):
        
        rId, slide = self.part.add_slide(slide_layout)
        slide.shapes.clone_layout_placeholders(slide_layout)
        self._sldIdLst.add_sldId(rId)
        return slide
1363039
def identifier(self):
        

        if not self.section.name:
            return self.name
        return preferences_settings.SECTION_KEY_SEPARATOR.join([self.section.name, self.name])
758731
def index_to_time_seg(time_seg_idx, slide_step):
    
    assert (time_seg_idx * slide_step < const.MINUTES_IN_A_DAY)
    return time_util.minutes_to_time_str(time_seg_idx * slide_step)
960357
def get_next_assessment_part_id(self, assessment_part_id):
        """"""
        if self.has_next_assessment_part(assessment_part_id):
            return Id(self._my_map['childIds'][self._my_map['childIds'].index(str(assessment_part_id)) + 1])
471307
def get_feature_id(self, feature):
        """"""
        fields = self.feature_identifier.split('.')[1:]
        return functools.reduce(operator.getitem, fields, feature)
683429
def _id(self):
        """"""
        return (self.__class__, self.number_of_needles, self.needle_positions,
                self.left_end_needle)
385058
def method_id(self, api_info):
    """"""
    # This is done here for now because at __init__ time, the method is known
    # but not the api, and thus not the api name.  Later, in
    # ApiConfigGenerator.__method_descriptor, the api name is known.
    if api_info.resource_name:
      resource_part = '.%s' % self.__safe_name(api_info.resource_name)
    else:
      resource_part = ''
    return '%s%s.%s' % (self.__safe_name(api_info.name), resource_part,
                        self.__safe_name(self.name))
778346
def retrieve(self, identifier, *criterion):
        
        return self._retrieve(
            self.model_class.id == identifier,
            *criterion
        )
363022
def layout(self, slide):
        

        image = Image.new('RGB', (WIDTH, HEIGHT), 'black')
        draw = ImageDraw.Draw(image)
        draw.font = self.font
        
        self.vertical_layout(draw, slide)
        
        self.horizontal_layout(draw, slide)

        return slide
1196517
def _SlidePlaceholderFactory(shape_elm, parent):
    
    tag = shape_elm.tag
    if tag == qn('p:sp'):
        Constructor = {
            PP_PLACEHOLDER.BITMAP:  PicturePlaceholder,
            PP_PLACEHOLDER.CHART:   ChartPlaceholder,
            PP_PLACEHOLDER.PICTURE: PicturePlaceholder,
            PP_PLACEHOLDER.TABLE:   TablePlaceholder,
        }.get(shape_elm.ph_type, SlidePlaceholder)
    elif tag == qn('p:graphicFrame'):
        Constructor = PlaceholderGraphicFrame
    elif tag == qn('p:pic'):
        Constructor = PlaceholderPicture
    else:
        Constructor = BaseShapeFactory
    return Constructor(shape_elm, parent)
876542
def pick_master_slide(master_slides_path: Path) -> Path:
    

    if master_slides_path.is_file():
        return master_slides_path

    master_slides = [
        f.name for f in master_slides_path.iterdir()
        if f.suffix == '.pptx'
        if not f.name.startswith("archived")
    ]

    if master_slides:
        return Path(master_slides_path, random.choice(master_slides))

    raise ValueError(f"Unable to find any valid pptx template file in {master_slides_path}")
886539
def _base_placeholder(self):
        
        layout, idx = self.part.slide_layout, self._element.ph_idx
        return layout.placeholders.get(idx=idx)
697594
def getDisplayIdentifier(self):
        
        if self.display_identifier is not None:
            return self.display_identifier
        if self.claimed_id is None:
            return None
        else:
            return urlparse.urldefrag(self.claimed_id)[0]
854529
def _identify_poly(core):
    """"""
    return core.A, core.dim, core.shape, core.dtype