Need script to list s3 buckets group by region

can any one help the script to get all the s3 buckets groupped by region.