async def probe_node_type_major(self, client):
        """Determine if import source node is a CN or MN and which major version API to
        use."""
        try:
            node_pyxb = await self.get_node_doc(client)
        except d1_common.types.exceptions.DataONEException as e:
            raise django.core.management.base.CommandError(
                "Could not find a functional CN or MN at the provided BaseURL. "
                'base_url="{}" error="{}"'.format(
                    self.options["baseurl"], e.friendly_format()
                )
            )

        is_cn = d1_common.type_conversions.pyxb_get_type_name(node_pyxb) == "NodeList"

        if is_cn:
            self.assert_is_known_node_id(
                node_pyxb, django.conf.settings.NODE_IDENTIFIER
            )
            self._logger.info(
                "Importing from CN: {}. filtered on MN: {}".format(
                    d1_common.xml.get_req_val(
                        self.find_node(node_pyxb, self.options["baseurl"]).identifier
                    ),
                    django.conf.settings.NODE_IDENTIFIER,
                )
            )
            return "cn", "v2"
        else:
            self._logger.info(
                "Importing from MN: {}".format(
                    d1_common.xml.get_req_val(node_pyxb.identifier)
                )
            )
            return "mn", self.find_node_api_version(node_pyxb)
async def probe_node_type_major ( self , client ) : try : node_pyxb = await self . get_node_doc ( client ) except d1_common . types . exceptions . DataONEException as e : raise django . core . management . base . CommandError ( "Could not find a functional CN or MN at the provided BaseURL. " 'base_url="{}" error="{}"' . format ( self . options [ "baseurl" ] , e . friendly_format ( ) ) ) is_cn = d1_common . type_conversions . pyxb_get_type_name ( node_pyxb ) == "NodeList" if is_cn : self . assert_is_known_node_id ( node_pyxb , django . conf . settings . NODE_IDENTIFIER ) self . _logger . info ( "Importing from CN: {}. filtered on MN: {}" . format ( d1_common . xml . get_req_val ( self . find_node ( node_pyxb , self . options [ "baseurl" ] ) . identifier ) , django . conf . settings . NODE_IDENTIFIER , ) ) return "cn" , "v2" else : self . _logger . info ( "Importing from MN: {}" . format ( d1_common . xml . get_req_val ( node_pyxb . identifier ) ) ) return "mn" , self . find_node_api_version ( node_pyxb )
Determine if import source node is a CN or MN and which major version API to
        use.