code: def enforce_decimal_places(value: Union[str, float]) -> str:
      if not isinstance(value, str) or (
          isinstance(value, str)
          and "{" not in value
          and "-" not in value
      ):
          return f"{float(value):.3f}"
      return value
  
file_path: ParlAI/projects/roscoe/meta_evaluation/table_file_writing.py
imports: import copy
  import csv
  import math
  import os
  import pandas
  from typing import Dict, List, Union
  from projects.roscoe.score import FAITHFUL_SENT, FAITHFUL_WORD, INFORM_STEP, REPETITION_WORD, INFORM_CHAIN, REPETITION_SENT, COHERENCE_STEP_VS_STEP, DISCOURSE_REPRESENTATION, GRAMMAR_STEP, PPL_STEP, PPL_CHAIN
label_desc: Use image node_id 5 for calling a global function with example usage: enforce_decimal_places(value) and returns: value, float