def METHOD_NAME(context: Context, company: Entity, owners: Optional[str]) -> None:
    if owners is None:
        return
    for owner in owners.split("),"):
        owner = owner.replace(")", "")
        country = None
        if "(" in owner:
            owner, country = owner.rsplit("(", 1)
        owner = owner.strip()
        bo = context.make("LegalEntity")
        bo.id = context.make_id(company.id, owner)
        bo.add("name", owner)
        bo.add("country", country)
        if country is not None and not bo.has("country"):
            context.log.warn("Unknown country code", country=country)
        if not bo.has("name"):
            continue
        context.emit(bo)
        own = context.make("Ownership")
        own.id = context.make_id("Ownership", company.id, owner)
        own.add("asset", company.id)
        own.add("owner", bo.id)
        own.add("role", "beneficiarilor efectivi")
        context.emit(own)