parameters: (service_name, region_cls=None, connection_cls=None)
return_statement: return region_objs
docstring: Given a service name (like ``ec2``), returns a list of ``RegionInfo``
      objects for that service.
  
      This leverages the ``endpoints.json`` file (+ optional user overrides) to
      configure/construct all the objects.
  
      :param service_name: The name of the service to construct the ``RegionInfo``
          objects for. Ex: ``ec2``, ``s3``, ``sns``, etc.
      :type service_name: string
  
      :param region_cls: (Optional) The class to use when constructing. By
          default, this is ``RegionInfo``.
      :type region_cls: class
  
      :param connection_cls: (Optional) The connection class for the
          ``RegionInfo`` object. Providing this allows the ``connect`` method on
          the ``RegionInfo`` to work. Default is ``None`` (no connection).
      :type connection_cls: class
  
      :returns: A list of configured ``RegionInfo`` objects
      :rtype: list
docstring_summary: Given a service name (like ``ec2``), returns a list of ``RegionInfo``
      objects for that service.
docstring_tokens: Given a service name ( like ec2 ) returns a list of RegionInfo objects for that service .
function: def get_regions(service_name, region_cls=None, connection_cls=None):
      """
      Given a service name (like ``ec2``), returns a list of ``RegionInfo``
      objects for that service.
  
      This leverages the ``endpoints.json`` file (+ optional user overrides) to
      configure/construct all the objects.
  
      :param service_name: The name of the service to construct the ``RegionInfo``
          objects for. Ex: ``ec2``, ``s3``, ``sns``, etc.
      :type service_name: string
  
      :param region_cls: (Optional) The class to use when constructing. By
          default, this is ``RegionInfo``.
      :type region_cls: class
  
      :param connection_cls: (Optional) The connection class for the
          ``RegionInfo`` object. Providing this allows the ``connect`` method on
          the ``RegionInfo`` to work. Default is ``None`` (no connection).
      :type connection_cls: class
  
      :returns: A list of configured ``RegionInfo`` objects
      :rtype: list
      """
      endpoints = load_regions()
  
      if service_name not in endpoints:
          raise BotoClientError(
              "Service '%s' not found in endpoints." % service_name
          )
  
      if region_cls is None:
          region_cls = RegionInfo
  
      region_objs = []
  
      for region_name, endpoint in endpoints.get(service_name, {}).items():
          region_objs.append(
              region_cls(
                  name=region_name,
                  endpoint=endpoint,
                  connection_cls=connection_cls
              )
          )
  
      return region_objs
function_tokens: def get_regions ( service_name , region_cls = None , connection_cls = None ) : endpoints = load_regions ( ) if service_name not in endpoints : raise BotoClientError ( "Service '%s' not found in endpoints." % service_name ) if region_cls is None : region_cls = RegionInfo region_objs = [ ] for region_name , endpoint in endpoints . get ( service_name , { } ) . items ( ) : region_objs . append ( region_cls ( name = region_name , endpoint = endpoint , connection_cls = connection_cls ) ) return region_objs