code: def resourceprep(string, allow_unassigned=False):
      
  
      chars = list(string)
      _resourceprep_do_mapping(chars)
      do_normalization(chars)
      check_prohibited_output(
          chars,
          (
              stringprep.in_table_c12,
              stringprep.in_table_c21,
              stringprep.in_table_c22,
              stringprep.in_table_c3,
              stringprep.in_table_c4,
              stringprep.in_table_c5,
              stringprep.in_table_c6,
              stringprep.in_table_c7,
              stringprep.in_table_c8,
              stringprep.in_table_c9,
          ))
      check_bidi(chars)
  
      if not allow_unassigned:
          check_unassigned(
              chars,
              (
                  stringprep.in_table_a1,
              )
          )
  
      return "".join(chars)
docs: Process the given `string` using the Resourceprep (`RFC 6122`_) profile. In
      the error cases defined in `RFC 3454`_ (stringprep), a :class:`ValueError`
      is raised.