code: def get_region(cls, resource=None):
          
          if resource:
              resource_info = cls.parse_remote(resource)
              if resource_info.region:
                  return resource_info.region
  
          return os.environ.get("AWS_DEFAULT_REGION", cls._DEFAULT_REGION)
docs: Retrieve region from standard environmental variables
          or file name.
  
          More information of the following link: http://goo.gl/Vb9Jky