def METHOD_NAME(
    self,
    namespace: str = None,
    user: str = None,
    search_pattern: str = None,
    language: str = None,
) -> List[GitProject]:
    if namespace:
        group = self.gitlab_instance.groups.get(namespace)
        projects = group.projects.list(all=True)
    elif user:
        user_object = self.gitlab_instance.users.list(username=user)[0]
        projects = user_object.projects.list(all=True)
    else:
        raise OperationNotSupported
    gitlab_projects: List[GitProject]
    if language:
        # group.projects.list gives us a GroupProject instance
        # in order to be able to filter by language we need Project instance
        projects_to_convert = [
            self.gitlab_instance.projects.get(item.attributes["id"])
            for item in projects
            if language
            in self.gitlab_instance.projects.get(item.attributes["id"])
            .languages()
            .keys()
        ]
    else:
        projects_to_convert = projects
    gitlab_projects = [
        GitlabProject(
            repo=project.attributes["path"],
            namespace=project.attributes["namespace"]["full_path"],
            service=self,
        )
        for project in projects_to_convert
    ]
    return gitlab_projects