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: config.go
    path of file: ./repos/magma/lte/cloud/go/services/eps_authentication/servicers
    
    the code of the file until where you have to start completion: /*
Copyright 2022 The Magma Authors.

This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package servicers

import (
	"context"
	"sync"
	"time"

	"github.com/golang/glog"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"

	"magma/lte/cloud/go/lte"
	"magma/lte/cloud/go/serdes"
	"magma/lte/cloud/go/services/lte/obsidian/models"
	"magma/orc8r/cloud/go/services/configurator"
)

// ConfigCacheTTL is a TTL of cached configs instances
const ConfigCacheTTL = time.Minute * 10

// EpsAuthConfig stores network related configs needed
type EpsAuthConfig struct {
	LteAuthOp          []byte
	LteAuthAmf         []byte
	SubProfiles        map[string]models.NetworkEpcConfigsSubProfilesAnon
	ApnConfigs         map[string]*models.ApnConfiguration
	ApnResources       map[string]*models.ApnResource
	ApnResourcesByName map[string]*models.ApnResource

    
func GetConfig(networkID string) (*EpsAuthConfig, error) {
	now := time.Now()
	cfgCache.RLock()
	cfg, found := cfgCache.configs[networkID]
	cfgCache.RUnlock()

	if found && cfg != nil && now.Before(cfg.lastUpdate.Add(ConfigCacheTTL)) {
		return cfg, nil
	}

	iCellularConfigs, err := configurator.LoadNetworkConfig(
		context.Background(), networkID, lte.CellularNetworkConfigType, serdes.Network)
	if err != nil {
		return nil, err
	}
	if iCellularConfigs == nil {
		return nil, status.Error(codes.NotFound, "got nil when looking up config")
	}
	cellularConfig, ok := iCellularConfigs.(*models.NetworkCellularConfigs)
	if !ok {
		return nil, status.Error(codes.FailedPrecondition, "failed to convert config")
	}
	epc := cellularConfig.Epc

	apnCfgs, err := loadApnsByName(networkID)
	if err != nil {
		glog.Errorf("failed to get APNs by name for network '%s': %v", networkID, err)
	}
	networkApnResources, networkApnResourcesByName, err := loadApnsResources(networkID)
	if err != nil {
		glog.Errorf("failed to get APN Resources for network '%s': %v", networkID, err)
	}
	cfg = &EpsAuthConfig{
		LteAuthOp:          epc.LteAuthOp,
		LteAuthAmf:         epc.LteAuthAmf,
		SubProfiles:        epc.SubProfiles,
		ApnConfigs:         apnCfgs,
		ApnResources:       networkApnResources,
		ApnResourcesByName: networkApnResourcesByName,
		lastUpdate:         now,
	}
	cfgCache.Lock()
	cfgCache.configs[networkID] = cfg
	cfgCache.Unlock()

	return cfg, nil
}