def METHOD_NAME(env_name: str | None) -> list[OCMEnvironment]:
    return ocm_environment_query(
        gql.get_api().query,
        variables={"name": env_name} if env_name else None,
    ).environments