Custom LDAP Mapper

Hi Guys,

Would be possible implement a custom mapper for LDAP?
I have a few groups defined on Keycloak and would like to automatically assign them to the users once I sync LDAP, the map would be based on LDAP roles.

I have a project already doing it externally, but I would like to turn it in a mapper inside keycloak.
So, what kind of mapper should I implement? Is there any possible example for it? Is it possible?