def METHOD_NAME(context, company: Entity, date, members: List[str]):
    for name in members:
        name = name.strip()
        if name:
            member = context.make("LegalEntity")
            member.id = context.make_id(company.id, name)
            member.add("name", name, lang="rum")
            membership = context.make("Membership")
            membership.id = context.make_id(member.id, "in", company.id)
            membership.add("member", member)
            membership.add("organization", company)
            if date:
                membership.add("date", date)
            yield member
            yield membership