parameters: (layer)
return_statement: return vals
docstring: Get the configured time dimension metadata for the layer as a dict.
  
      The keys of the dict will be those of the parameters of `set_time_info`.
  
      :returns: dict of values or None if not configured
docstring_summary: Get the configured time dimension metadata for the layer as a dict.
docstring_tokens: Get the configured time dimension metadata for the layer as a dict .
function: def get_time_info(layer):
      '''Get the configured time dimension metadata for the layer as a dict.
  
      The keys of the dict will be those of the parameters of `set_time_info`.
  
      :returns: dict of values or None if not configured
      '''
      layer = gs_catalog.get_layer(layer.name)
      if layer is None:
          raise ValueError(f'no such layer: {layer.name}')
      resource = layer.resource if layer else None
      if not resource:
          resources = gs_catalog.get_resources(stores=[layer.name])
          if resources:
              resource = resources[0]
  
      info = resource.metadata.get('time', None) if resource.metadata else None
      vals = None
      if info:
          value = step = None
          resolution = info.resolution_str()
          if resolution:
              value, step = resolution.split()
          vals = dict(
              enabled=info.enabled,
              attribute=info.attribute,
              end_attribute=info.end_attribute,
              presentation=info.presentation,
              precision_value=value,
              precision_step=step,
          )
      return vals
function_tokens: def get_time_info ( layer ) : layer = gs_catalog . get_layer ( layer . name ) if layer is None : raise ValueError ( f'no such layer: {layer.name}' ) resource = layer . resource if layer else None if not resource : resources = gs_catalog . get_resources ( stores = [ layer . name ] ) if resources : resource = resources [ 0 ] info = resource . metadata . get ( 'time' , None ) if resource . metadata else None vals = None if info : value = step = None resolution = info . resolution_str ( ) if resolution : value , step = resolution . split ( ) vals = dict ( enabled = info . enabled , attribute = info . attribute , end_attribute = info . end_attribute , presentation = info . presentation , precision_value = value , precision_step = step , ) return vals