code: def artifact2destination(self, artifact, descriptor):
          
  
          _art = base64.b64decode(artifact)
  
          assert _art[:2] == ARTIFACT_TYPECODE
  
          try:
              endpoint_index = str(int(_art[2:4]))
          except ValueError:
              endpoint_index = str(int(hexlify(_art[2:4])))
          entity = self.sourceid[_art[4:24]]
  
          destination = None
          for desc in entity["%s_descriptor" % descriptor]:
              for srv in desc["artifact_resolution_service"]:
                  if srv["index"] == endpoint_index:
                      destination = srv["location"]
                      break
  
          return destination
docs: Translate an artifact into a receiver location
  
          :param artifact: The Base64 encoded SAML artifact
          :return: