parameters: (features, new_grist)
docstring: Replaces the grist of a string by a new one.
          Returns the string with the new grist.
docstring_summary: Replaces the grist of a string by a new one.
          Returns the string with the new grist.
docstring_tokens: Replaces the grist of a string by a new one . Returns the string with the new grist .
function: def replace_grist (features, new_grist):
      """ Replaces the grist of a string by a new one.
          Returns the string with the new grist.
      """
      def replace_grist_one (name, new_grist):
          split = __re_grist_and_value.match (name)
          if not split:
              return new_grist + name
          else:
              return new_grist + split.group (2)
  
      if isinstance (features, str):
          return replace_grist_one (features, new_grist)
      else:
          return [ replace_grist_one (feature, new_grist) for feature in features ]
function_tokens: def replace_grist ( features , new_grist ) : def replace_grist_one ( name , new_grist ) : split = __re_grist_and_value . match ( name ) if not split : return new_grist + name else : return new_grist + split . group ( 2 ) if isinstance ( features , str ) : return replace_grist_one ( features , new_grist ) else : return [ replace_grist_one ( feature , new_grist ) for feature in features ]