def METHOD_NAME(self, base, view, properties):
    mapper_properties = base.define_mapper_args()
    for field in properties["loaded_columns"]:
        if not hasattr(
            properties[anyblok_column_prefix + field], "anyblok_field"
        ):
            mapper_properties[field] = getattr(view.c, field)
            continue
        anyblok_field = properties[
            anyblok_column_prefix + field
        ].anyblok_field
        kwargs = anyblok_field.kwargs.copy()
        if "foreign_keys" in kwargs:
            foreign_keys = kwargs["foreign_keys"][1:][:-1].split(", ")
            foreign_keys = [
                getattr(view.c, x.split(".")[1]) for x in foreign_keys
            ]
            kwargs["foreign_keys"] = foreign_keys
        if anyblok_field.model.model_name == base.__registry_name__:
            remote_columns = get_columns(
                view, kwargs["info"]["remote_columns"]
            )
            local_columns = get_columns(
                view, kwargs["info"]["local_columns"]
            )
            assert len(remote_columns) == len(local_columns)
            primaryjoin = []
            for i in range(len(local_columns)):
                primaryjoin.append(remote_columns[i] == local_columns[i])
            if len(primaryjoin) == 1:
                primaryjoin = primaryjoin[0]
            else:
                primaryjoin = and_(*primaryjoin)
            kwargs["remote_side"] = remote_columns
            kwargs["primaryjoin"] = primaryjoin
            Model = base
        else:
            Model = self.registry.get(anyblok_field.model.model_name)
        mapper_properties[field] = relationship(Model, **kwargs)
    return mapper_properties