def render_value_in_context(value, context):
 value = template_localtime(value, use_tz=context.use_tz)
 value = localize(value, use_l10n=context.use_l10n)
 value = force_text(value)
 if ((context.autoescape and (not isinstance(value, SafeData))) or isinstance(value, EscapeData)):
  return escape(value)
 else:
  return value

def render_value_in_context ( value , context ) : value = template_localtime ( value , use_tz = context . use_tz ) value = localize ( value , use_l10n = context . use_l10n ) value = force_text ( value ) if ( ( context . autoescape and ( not isinstance ( value , SafeData ) ) ) or isinstance ( value , EscapeData ) ) : return escape ( value ) else : return value
converts any value to a string to become part of a rendered template .