You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: parse_filename.m
    path of file: ./repos/ExploreASL/External/bids-matlab/+bids/+internal
    
    the code of the file until where you have to start completion: function p = parse_filename(filename, fields)
  % Split a filename into its building constituents
  % FORMAT p = bids.internal.parse_filename(filename, fields)
  %
  % Example:
  %
  % >> filename = '../sub-16/anat/sub-16_ses-mri_run-1_echo-2_FLASH.nii.gz';
  % >> bids.internal.parse_filename(filename)
  %
  % ans =
  %
  %   struct with fields:
  %
  %     filename: 'sub-16_ses-mri_run-1_echo-2_FLASH.nii.gz'
  %         type: 'FLASH'

    
function p = parse_filename(filename, fields)
  % Split a filename into its building constituents
  % FORMAT p = bids.internal.parse_filename(filename, fields)
  %
  % Example:
  %
  % >> filename = '../sub-16/anat/sub-16_ses-mri_run-1_echo-2_FLASH.nii.gz';
  % >> bids.internal.parse_filename(filename)
  %
  % ans =
  %
  %   struct with fields:
  %
  %     filename: 'sub-16_ses-mri_run-1_echo-2_FLASH.nii.gz'
  %         type: 'FLASH'
  %          ext: '.nii.gz'
  %          sub: '16'
  %          ses: 'mri'
  %          run: '1'
  %         echo: '2'
  % __________________________________________________________________________

  % Copyright (C) 2016-2018, Guillaume Flandin, Wellcome Centre for Human Neuroimaging
  % Copyright (C) 2018--, BIDS-MATLAB developers

  filename = bids.internal.file_utils(filename, 'filename');

  % -Identify all the BIDS entity-label pairs present in the filename (delimited by "_")
  % https://bids-specification.readthedocs.io/en/stable/99-append