<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def specs_to_string(specs):
 # type: (List[Union[STRING_TYPE, Specifier]]) -> AnyStr """ Turn a list of specifier tuples into a string """


    if specs:
        if isinstance(specs, six.string_types):
            return specs
        try:
            extras = ",".join(["".join(spec) for spec in specs])
        except TypeError:
            extras = ",".join(["".join(spec._spec) for spec in specs])  # type: ignore
        return extras
    return ""