@staticmethod
def _parkey_from_filename(filename):
    """Extract parkey from component filename in the format of
        ``name[parkey#]``.

        """
    if filename.endswith('#]'):
        x = filename.split('[')
        parkey = x[1][:-2]
    else:
        parkey = None
    return parkey
