def complete_deposit(self,
                        se_iri = None,
                        on_behalf_of=None,
                        dr = None):
        
        if not se_iri:
            if dr != None:
                conn_l.info("Using the deposit receipt to get the SWORD2-Edit-IRI")
                se_iri = dr.se_iri
                if se_iri:
                    conn_l.info("Complete deposit using the SWORD2-Edit-IRI %s" % se_iri)
                else:
                    # we could try the edit-media IRI although technically that's not what it's for
                    se_iri = dr.edit
                    if se_iri:
                        conn_l.info("Complete deposit using the Edit-IRI %s as SWORD2-Edit-IRI not available" % se_iri)
                    else:
                        raise Exception("No SWORD2-Edit-IRI was given and no suitable IRI was found in the deposit receipt.")
            else:
                raise Exception("No SWORD2-Edit-IRI was given")
        else:
            conn_l.info("Complete deposit using the SWORD2-Edit-IRI %s" % se_iri)
        
        return self._make_request(target_iri = se_iri,
                                  on_behalf_of=on_behalf_of,
                                  in_progress='false',
                                  method="POST",
                                  empty=True,
                                  request_type='SE_IRI Complete Deposit')
Completing a Previously Incomplete Deposit
dataset/ETHPy150Open swordapp/python-client-sword2/sword2/connection.py/Connection.complete_deposit