original_docstring: 
      Convert a floating point value to a decimal that DynamoDB can store,
      and allow rounding.
      
docstring: Convert a floating point value to a decimal that DynamoDB can store,
  and allow rounding.
docstring_tokens: Convert a floating point value to a decimal that DynamoDB can store and allow rounding .
code: def round_float_to_decimal(float_value):
      """
      Convert a floating point value to a decimal that DynamoDB can store,
      and allow rounding.
      """
  
      # Perform the conversion using a copy of the decimal context that boto3
      # uses. Doing so causes this routine to preserve as much precision as
      # boto3 will allow.
      with decimal.localcontext(boto3.dynamodb.types.DYNAMODB_CONTEXT) as \
           decimalcontext:
  
          # Allow rounding.
          decimalcontext.traps[decimal.Inexact] = 0
          decimalcontext.traps[decimal.Rounded] = 0
          decimal_value = decimalcontext.create_decimal_from_float(float_value)
          g_logger.debug("float: {}, decimal: {}".format(float_value,
                                                         decimal_value))
  
          return decimal_value
code_tokens: def round_float_to_decimal ( float_value ) : with decimal . localcontext ( boto3 . dynamodb . types . DYNAMODB_CONTEXT ) as decimalcontext : decimalcontext . traps [ decimal . Inexact ] = 0 decimalcontext . traps [ decimal . Rounded ] = 0 decimal_value = decimalcontext . create_decimal_from_float ( float_value ) g_logger . debug ( "float: {}, decimal: {}" . format ( float_value , decimal_value ) ) return decimal_value
short_docstring: Convert a floating point value to a decimal that DynamoDB can store,
  and allow rounding.
short_docstring_tokens: Convert a floating point value to a decimal that DynamoDB can store and allow rounding .
comment: """
      Convert a floating point value to a decimal that DynamoDB can store,
      and allow rounding.
      """$SEP$# Perform the conversion using a copy of the decimal context that boto3$SEP$# uses. Doing so causes this routine to preserve as much precision as$SEP$# boto3 will allow.$SEP$# Allow rounding.