You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: utils.go
    path of file: ./repos/mergestat-lite/extensions/internal/github
    
    the code of the file until where you have to start completion: package github

import (
	"errors"
	"strconv"
	"strings"
	"time"

	"github.com/mergestat/mergestat-lite/extensions/options"
	"github.com/mergestat/mergestat-lite/extensions/services"
	"github.com/rs/zerolog"
	"github.com/shurcooL/githubv4"
	"golang.org/x/time/rate"
)

type Options struct {
	Client                func() *githubv4.Client
	RateLimiter           *rate.Limiter
	RateLimitHandler      func(*options.GitHubRateLimitResponse)
	GitHubPreRequestHook  func()
	GitHubPostRequestHook func()
	// PerPage is the default number of items per page to use when making a paginated GitHub API request
	PerPage int
	Logger  *zerolog.Logger
}

// GetGitHubTokenFromCtx looks up th
    
func GetGitHubRateLimitFromCtx(ctx services.Context) *rate.Limiter {
	if val, ok := ctx["githubRateLimit"]; ok {
		if strings.Contains(val, "/") {
			parts := strings.SplitN(val, "/", 2)
			if len(parts) != 2 {
				return nil
			}

			var first, second int
			var err error
			if first, err = strconv.Atoi(parts[0]); err != nil {
				return nil
			}
			if second, err = strconv.Atoi(parts[1]); err != nil {
				return nil
			}

			return rate.NewLimiter(
				rate.Every(time.Second*time.Duration(second)),
				first,
			)
		} else {
			if perSec, ok := ctx.GetInt("githubRateLimit"); ok {
				return rate.NewLimiter(rate.Every(time.Second), perSec)
			} else {
				return nil
			}
		}
	} else {
		return nil
	}
}