def METHOD_NAME(self, org_code):
    org = (
        Organisation.objects.filter(organisation_type="local-authority")
        .filter(official_identifier=org_code)
        .latest()
    )
    divset = OrganisationDivisionSet.objects.filter(
        organisation=org
    ).latest()
    # divset is the DivisionSet with the most recent start date
    if not divset.divisions.all():
        error = (
            "Candidate DivisionSet '%s' has no Divisions. Can not import boundaries"
            % (divset)
        )
        raise Exception(error)
    if divset.has_related_geographies:
        error = (
            "Candidate DivisionSet '%s' already has related Geographies. Can not import boundaries"
            % (divset)
        )
        raise Exception(error)
    if divset.end_date:
        error = (
            "Candidate DivisionSet '%s' already has end_date %s. Expected NULL"
            % (divset, divset.end_date)
        )
        raise Exception(error)
    """
    If we got to here, divset satisfies the following criteria:
    - It has the most recent start date
    - It has a NULL end date
    - It has related Divisions
    - It does not have related DivisionGeographies
    so its a pretty safe bet to assume this is the DivisionSet
    we want to import boundaries against.
    TODO: we could also allow the user to manually specify a DivisionSet
    as a command line argument in case we wanted to override this logic
    (e.g: importing historic boundaries)
    """
    return divset