def get_command(line, fmt_space):
    """
    Given a header line, get the possible command

    Parameters
    -----------
    line : string
        Line of the header

    fmt_space : boolean
        Yes = Novonix format with spaces in the commands

    Returns
    --------
    command : string
        Instruction in the header line

    Examples
    ---------
    >>> import preparenovonix.novonix_io as prep
    >>> command = prep.get_command('[Open circuit storage]',fmt_space=True)
    >>> print(command)
    Open circuit storage
    """

    command = " "

    fw = line.strip()
    # Find commands ignoring left spaces
    if fmt_space:
        command = fw[1:-1]
    else:
        if ":" in fw:
            command = fw.split(":")[1].strip()
        else:
            command = fw[1:-1]
    return command