def METHOD_NAME(cli_ctx, resource_group_name):
    from msrestazure.azure_exceptions import CloudError
    try:
        resource_client = resource_client_factory(cli_ctx).resource_groups
        return resource_client.get(resource_group_name)
    except CloudError as ex:
        if ex.status_code == 404:
            return None
        raise