code: def load_frames(group, directory, extension, separator, splits=False):
      r"""Read a group of dataframes into memory.
  
      Parameters
      ----------
      group : alphapy.Group
          The collection of frames to be read into memory.
      directory : str
          Full directory specification.
      extension : str
          File name extension, e.g., ``csv``.
      separator : str
          The delimiter between fields in the file.
      splits : bool, optional
          If ``True``, then all the members of the group are stored in
          separate files corresponding with each member. If ``False``,
          then the data are stored in a single file.
  
      Returns
      -------
      all_frames : list
          The list of pandas dataframes loaded from the file location. If
          the files cannot be located, then ``None`` is returned.
  
      """
      logger.info("Loading frames from %s", directory)
      gname = group.name
      gspace = group.space
      # If this is a group analysis, then consolidate the frames.
      # Otherwise, the frames are already aggregated.
      all_frames = []
      if splits:
          gnames = [item.lower() for item in group.members]
          for gn in gnames:
              fname = frame_name(gn, gspace)
              if fname in Frame.frames:
                  logger.info("Joining Frame %s", fname)
                  df = Frame.frames[fname].df
              else:
                  logger.info("Data Frame for %s not found", fname)
                  # read file for corresponding frame
                  logger.info("Load Data Frame %s from file", fname)
                  df = read_frame(
                      directory, fname, extension, separator
                  )
              # add this frame to the consolidated frame list
              if not df.empty:
                  # set the name
                  df.insert(0, TAG_ID, gn)
                  all_frames.append(df)
              else:
                  logger.debug("Empty Data Frame for: %s", gn)
      else:
          # no splits, so use data from consolidated files
          fname = frame_name(gname, gspace)
          df = read_frame(directory, fname, extension, separator)
          if not df.empty:
              all_frames.append(df)
      return all_frames
  
file_path: AlphaPy/alphapy/frame.py
imports: from alphapy.globals import PSEP, SSEP, USEP
  from alphapy.globals import TAG_ID
  import logging
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: load_frames(group, directory, extension, separator, splits) and returns: all_frames