def _get_nds2_name(channel):
if hasattr(channel, '<STR_LIT>'):  <EOL><INDENT>return channel.ndsname<EOL><DEDENT>if hasattr(channel, '<STR_LIT>'):  <EOL><INDENT>return '<STR_LIT>' % (channel.name,<EOL>channel.channel_type_to_string(channel.channel_type))<EOL><DEDENT>return str(channel)<EOL>
Returns the NDS2-formatted name for a channel

    Understands how to format NDS name strings from
    `gwpy.detector.Channel` and `nds2.channel` objects