def get_org_name_from_domain(domain: str) -> str:
        """
        Generate an organisation name from the provided domain.
            e.g. google.com -> google
        """
        parts = domain.split(".")
        if len(parts) < 2:
            raise ValueError(f"Invalid domain: {domain}")
        return parts[-2]

        Generate an organisation name from the provided domain.
            e.g. google.com -> google
        
api/integrations/lead_tracking/pipedrive/models.py